Re: Secret new routine_id() feature. (Attn: Rob)
- Posted by Greg Haberek <ghaberek at gmail.com> Dec 09, 2004
- 535 views
This is very interesting. Whether or not Rob decides to keep this feature, er.. bug, I'll keep it in EG. Although, the reason you can not call routines (by forward reference) directly is because the parser does not see the routine as a defined symbol before it is defined (obviously), where as routine_id() returns an id at run time. This 'bug' also applies to variable_id() in EG, as well as routine_name(), routine_list(), variable_name() and variable_list() as well as read() and write(). ~Greg On Wed, 08 Dec 2004 16:25:43 -0800, Andy Serpa <guest at rapideuphoria.com> wrote: > > posted by: Andy Serpa <ac at onehorseshy.com> > > I just noticed that in v2.5, routine_id() can now "see ahead" and give you > routine numbers for functions occuring below in the code or in files including > after the current one (if the routine is global). This new ability is not in the > release notes, and the docs for routine_id() still say the routine must be > "visible" to get the routine number. > > I assume this stems from the fact that all the code is now parsed in advance. > While this is a welcome change, it begs the question: why not now allow full > forward referencing and let us call routines defined below in the code directly? > > [ Rob: if you actually did not know of this new ability, which I suspect since > it is not mentioned anywhere, please leave it that way. ] > > > >