|
On Tue, 25 May 2010 12:15:26 -0700, Tomas Guisasola Gorham <tomas@tecgraf.puc-rio.br> wrote:
Hi HenkOn 25 May 2010 14:22, Tomas Guisasola Gorham <tomas@tecgraf.puc-rio.br> wrote:Sure. However, the "body" of a function is a chunk isn't it? I thought it should have a different (local) _ENV like the above code?The body of a function is a block, not a chunk. As Roberto said (and as hinted in the manual), a chunk is a compilation unit.I checked the "Complete Syntax of Lua" (chapter 9 of 5.2 docs): function ::= function funcbody funcbody ::= '(' [parlist] ')' block end block ::= chunk Maybe I'm missing something... Tomás