Re: routine_id evaluation
- Posted by Kat <gertie at PELL.NET> Dec 04, 2000
- 544 views
On 4 Dec 2000, at 8:55, Matthew Lewis wrote: > > Well, since you mention it, I'd say that routine_id() was *not* using a > forward reference. Only call_proc()/call_func() actually do that. :P > Sorry. > > Although I didn't [want to] go into it, I agree that it might be nice to > have the 2 pass interpreter that's been talked about in the past (which > should do what Derek wants), but, as with many things on various wish lists > floating around, I wouldn't count on this being implemented. In the meantime, > a scheme like what I proposed can be a work around. > > I probably wouldn't use routine_id() much less than now if we did have a two > pass interpreter. Although I encounter a few times where I need a simple > forward referenced function call, I typically use routine_id() for dynamic > function calling (ie, no way to know which routine needs to be called next), > as I did in matheval. Ok, what about a bat file that calls a preprocessor before the interpreter file, and it adds a "_" to proc/func names, and at the top of the program, it adds a routine_id() by the original name for *every* func/proc? Then you can call any function or procedure willy-nilly, no need to keep track of what is declared first in the program. Will that solve it? Kat