lua-users home
lua-l archive

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


> >   while cond do
> >     do :process_item:
> >
> >                     break :process_item:
> >
> >     end
> >   end
> 
> Well, will that execute the cond and exit if not satisfied?

I think the semantics is quite clear: "break :label:" exits the
block with that label, continuing normal execution exactly after its
corresponding "end".


> Why not do:
> 
>   while cond do :process_item:
> 
>                    break :process_item:
> 
>   end
> 
> directly?

I find this syntax a little confusing. Are you breaking the inner block
or the loop itself?

-- Roberto