lua-users home
lua-l archive

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


On Tue, Jun 14, 2011 at 08:18:58PM +0200, Florian Weimer wrote:
> * Roberto Ierusalimschy:
> 
> > Now, when the compiler sees label 0, label 2 and label 1 are out of
> > scope, so it makes no sense to raise an error.
> 
> Unless labels are of function scope, which I strongly recommend.  I
> really doubt Lua 5.2 implements non-local goto from a lexically nested
> function to a label in the enclosing function. 8-)
> 

The reference manual clearly states:

> A label is visible in the entire block where it is defined (including 
> nested blocks, but not nested functions). 

Dirk