Re: Universal Routine Pointers
Ralf writes:
> Does any one know if the routine pointers between
> c-function/euphoria-routines are universal ?
> I mean, when I already routine_id () -ed 2 euphoria routines, and then I
> link a c-routine, is the number of the c-routine unique ?
With the *current* implementation, the routine id numbers
increase independently for C routines vs. Euphoria routines.
You could have C routine #3 and Euphoria routine #3 at the
same time in your program.
I think it's bad programming practice to make assumptions
about the routine id values that Euphoria will return to you.
(You can only assume they are integers >= -1.)
Also, keep in mind that a routine id value, like 7, say, is not valid
until routine_id(), or define_c_func()/define_c_proc()
has been called, and has returned 7 to you. You can't skip
calling these routines, and just go ahead and start using the
value 7 in c_func/c_proc/call_func/call_proc/call_back. You'll
get a run-time error. Since you can't avoid calling these routines,
why not use the routine id that's returned, rather than trying to
"guess", or assume, what the routine id will be?
Regards,
Rob Craig
Rapid Deployment Software
http://members.aol.com/FilesEu/
|
Not Categorized, Please Help
|
|