lua-users home
lua-l archive

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

In message 
you wrote:

> > Apologies. All this time I have been equating "chunk" with "block".
> No need to apologise [1]

> [1]
> "The unit of execution of Lua is called a chunk. Syntactically, a
> chunk is simply a block:
> chunk ::= block"

OK, the concept for which I had been wrongly using these words is one
for which I am ignorant of the right terminology. I think I mean a
subchunk that is maximal with the property that were an
enclosing chunk to be preceded by a local declaration the local 
variable would be in scope in the whole subchunk.

So for example in

do x = a(); y = b() end

the subchunks x = a() and y = b() are not maximal, even though
they are in the scope of foo in 

  do local foo = 57;  x = a(); y = b() end

Is this making any sense?

Gavin Wraith (
Home page: