lua-users home
lua-l archive

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


In message <20120627184905.GA7463@inf.puc-rio.br> you wrote:

> > Is this making any sense?
> 
> I do not think so. It is the same problem: blocks are lists of
> statements, but that does not mean that any list of statements is a
> block. If you draw the syntax tree of the above piece of code, it
> becomes clear that "x = a()" (in that particular place) is not a
> block. So, that occurence of "x = a()" cannot be a subblock.

OK. Reduction is not symmetric :). So, for checking that I have
it right, am I correct in saying that a local variable's scope 
consists of the statements or blocks that follow its declaration 
that also lie within the smallest block that contains its
declaration? 
 
-- 
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/