On Mon, Mar 10, 2008 at 1:01 AM, Tony Balinski <[EMAIL PROTECTED]> wrote:
> Quoting Thorsten Haude <[EMAIL PROTECTED]>:
>
>  > Hi,
>  >
>  > * Bert Wesarg wrote (2008-02-07 20:52):
>  > >On Feb 7, 2008 8:32 PM, Bert Wesarg <[EMAIL PROTECTED]> wrote:
>  > >> can someone please explain why this is necessary?
>  > >OK, I think this has to do with some sort of forward declaration. If a
>  > >function is used before it was defined, the symbol is promoted to
>  > >global. Right?
>  >
>  > Anyone? If the question came up it must mean that documentation is
>  > missing, so it would be nice if we could add it.
>
>  My understanding is to allow left-to-right scanning of expressions in the
>  parser.
>
>  In
>    a = fn(b)
>  when fn is encountered, it's treated as a local. When ( is seen, fn is
>  promoted to global, since all functions are global.
It is only treated as a local, if the 'define fn {' comes after this
statement. If it comes first, fn is already in the globalsymlist => no
need to promote.

Bert
>
>  At least, that's my understanding until I check parse.y!
I would appreciate it.

>
>  Tony
-- 
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to