lua-users home
lua-l archive

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


	Hi Roberto

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.)
	Ok.  Sorry for the noise.

(We will correct the manual to make things clearer. The correct
description should be that a chunk is a block, not that a block is a
chunk...)
	Much better!

	Regards,
		Tomás