Re: Resurection of routine_id forward referencing
- Posted by "Greg Haberek" <ghaberek at gmail.com> Sep 20, 2006
- 677 views
> This was forward referencing of routine_id. > Rob saw this as a bug, and "fixed" it, despite pleas from others, > especially Derek Parnell, to leave it in. Since Eu is going "open source", > can this feature be reinstated? I imagine we will need the eu2.5a source, > and some coding skill that I don't have! I for one do see it as a bug. It breaks the top-down format of of Euphoria. When I need jump back-and-forth between my code and reference various routines from anywhere, I declare an integer for the id of each routine I need at the very top of my code, then set that integer to the id right after the end statement. Allowing one to see "ahead" into the code breaks the core functionality of Euphoria. Let's not start this debate again...
-- declare id integers integer func2_id function func1() object i i = call_func( func2_id, {} ) return 0 end function function func2() return 1 end function func2_id = routine_id( "func2" )