lua-users home
lua-l archive

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


On 29/08/2011, at 9:06 PM, steve donovan wrote:

> Hi all,
> 
> http://luafaq.org/

1.26 Why is there no continue statement?

I thought that continue is problematic because

repeat print("A"); local stop = true; until stop

is not an infinite loop - that is, the scope of locals declared in a repeat includes the condition in the until.
Because of this the stop in

repeat print("A"); continue; local stop = true; until stop

is ambiguous.  Now that I think about it, if what's above is correct, then how does goto work?

Cheers,
Geoff