[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: continue/repeat...until false dichotomy
- From: Florian Weimer <fw@...>
- Date: Tue, 16 Feb 2010 22:44:43 +0100
* Brian Kelley:
> I've been reading this mailing list for quite a while now, and I've
> always been puzzled by the apparent consensus, documented in the FAQ,
> that continue is somehow incompatible with repeat ... until. The common
> example given is:
>
> repeat
> if cond then continue end
> local t = 1
> ...
> until t == 0
>
> Sure, that code looks broken, but where is the semantic conflict?
Make it:
repeat
local t = 0
if cond then continue end
local t = 1
...
until t == 0
Then the two t are actually different variables (in the current
implementation), and it's not clear to which incarnation the
comparison refers.