lua-users home
lua-l archive

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


On Sat, Jan 22, 2011 at 01:18, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Sat, Jan 22, 2011 at 10:00 AM, Steve Litt <slitt@troubleshooters.com> wrote:
>> I'd give my right arm for a continue statement within a loop. I know it's
>> lousy programming technique,
>
> This one comes up frequently ;)
>
> E.g.
>
> http://lua-users.org/lists/lua-l/2010-11/msg00479.html
>
> for an interesting generalization.
>
> I think the usu way of doing it is:
>
> while condition do repeat
>     if something then break end --- breaks the repeat, acts like continue
>     ...
> until true; end
>
> Of course, this means that it's hard to actually break out of the while...
>
> steve d.
>
> PS. I wouldn't necessarily think of 'continue' as bad
>
>

I'm often cursing the lack of a continue statement as well. Really
curious why it's missing.

-- 
Sent from my toaster.