Checking if routine id is of a procedure or a of function?
- Posted by David Guy <gad at cloud9.net> Apr 09, 2005
- 487 views
There does not seem to be a way to check if a routine id (obtained via routine_id()) represents a procedure or a function. I'm thinking of using callbacks to notify a running program of certain events. The program would pass in a routine id, and the routine would be called when the event occures. Some events need a function (return value required), some only need a procedure. I would like to be able to check that the correct type of routine has been provided (as opposed to just requiring that only functions be used and having to always return a value,) but it seems I can not. Something like this would be nice: if func_id(routine_id) then ... if proc_id(routine_id) then ... DGuy