lua-users home
lua-l archive

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


> >What gets the surrounding _ENV declaration are *chunks*, not functions.
> >Everything inside the same chunk (a compilation unit) share the same
> >_ENV, unless there are explicit declarations of other _ENVs.
> 	Sure.  However, the "body" of a function is a chunk isn't it?

No. A chunk is a compilation unit, that is, a string or file (or
whatever) being loaded together. (The manual says that "syntactically, a
block is the same as a chunk", but the "syntactically" may get lost when
reading the BNF.)

-- Roberto