Re: routine_id() Discovery
- Posted by CChris <christian.cuvier at agriculture.gouv.?r> May 21, 2008
- 688 views
c.k.lester wrote: > > Maybe this is common knowledge, but I just discovered this... > > A routine doesn't have to be global in order to call it from what would > otherwise require a global definition. > > For example, this would normally fail: > > -- mylib.e > func myfunc() > end func > > -- myprog.e > x = myfunc() > > with myfunc() is not defined (I think). > > But, if I add the routine_id() of myfunc() to a global list, then I can > call it from myprog.e with call_func(). > > That means it can be exported but not made global... right? This turns a global function into a global variable to hold or pass the routine_id. Great. It still needs being hidden. CChris