Re: Secret new routine_id() feature. (Attn: Rob)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Andy Serpa wrote:
> 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. ]
 
Thanks for reporting this bug.
It will be fixed in the beta release.
It looks like only the interpreters (PD and RDS) have the bug.
Translated code, bound code, and shrouded code seem to work correctly.
Even in 2.4 and earlier, many programs were parsed completely,
or almost completely, before routine_id() was executed.
I think it's better from a language design point of view that
routine_id() looks only at earlier routines, not later. 
My reasons are:
   1. I like to torture people.
   2. Check the EUforum archive for the other reasons.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu