[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: I'd give my right arm for a continue statement
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 28 Jan 2011 09:19:21 -0200
> > 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