[Prev][Next][Index][Thread]

Re: Q: statements in module file?



On 25 Jun 2001, Andreas Bogk wrote:
> "Roland Paterson-Jones" <rolandpj@bigfoot.com> writes:
>
> > semantics of this? Do the statements only have access to the definitions
> > appearing above them in the source file? If so, it's somewhat of a pain to
>
> No, you can also access definitons below.

Again IIRC, it's not *guaranteed* that you can access later definitions
from earlier "top-level forms" (or even from earlier definitions), it's
just "encouraged".  I have a vague recollection of *very* occasionally
seeing some "define class" calls which were sufficiently dynamic that they
had to be moved before their first point of reference, for FunDev to
accept them.

> The only exception are macros, they need to be defined before used. So
> you have to write macros using each other (as in the XML parser) in
> topological sort order.

I suppose, in theory, you could try some horrific hacks to allow forward
calls of macros but I wouldn't expect any sane implementation to allow
this.  I can't recall if the DRM forbids it.

-- 
Version 3.1 GCS/IT d- s+:+>+: a- C++$ UL P+ L+(++) E W++$ N++ o K++ w(++) O?
M V? PS(+) PE Y+ PGP->++ t(+) 5+(++) X(+) R tv b++ DI+ D+ G e++ h- r>++ y+
(Removed reversed spam from my email address to reply)




Follow-Ups: References: