lua-users home
lua-l archive

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

On Thu, Jan 27, 2011 at 11:42, Roberto Ierusalimschy
<> wrote:
> In Lua, we cannot have traditional labels, because the syntax "foo:"
> already has a different meaning. Instead, a simple syntax would be to
> add labels only to "do end" blocks, for instance like this:
>  do :label:
>    ...
>  end
> Then, a continue could be written like here:
>  while cond do
>    do :process_item:
>                    break :process_item:
>    end
>  end

this is great! Not only it would allow "continue" but this mechanism
will also provide means to break from multiple nested loops in one go.