[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: continue/repeat...until false dichotomy
- From: Matthew Wild <mwild1@...>
- Date: Tue, 16 Feb 2010 23:40:46 +0000
On 16 February 2010 22:24, Kelley, Brian <firstname.lastname@example.org> wrote:
> On Feb 16, 2010, at 1:44 PM, Florian Weimer wrote:
> Make it:
> 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.
> Why is it not clear? Would it be clearer without the continue statement?
> The continue statement does not impact the *scope* of variables. Scoping is
> lexical -- as written. Continue is just a restricted 'goto'.
If it's so clear, what is the behaviour of the code above?