lua-users home
lua-l archive

Re: [ANN] Lua 5.2.0 (beta-rc1) now available

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


On Tue, Jun 14, 2011 at 11:08:03PM +0200, Pierre-Yves Gérardy wrote:
> For statements create local variable, and, if I've properly understood
> the discussion so far (I haven't tested the beta rc1 yet), gotos can't
> cross local declarations.
I think that is the crux. Think of a label as the declaration
of a local variable. You can `goto l1` if and only `l1` would 
be in scope if you replaced `@l1:` by `local l1`.
Viewed this way, the suggestion of replacing the syntax `@l1`
by `label l1` makes a lot of sense. The syntax highlighters can 
make `label` obtrusively lurid, different from other keywords.
Dirk

AltStyle によって変換されたページ (->オリジナル) /