Re: I'd give my right arm for a continue statement
[
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: steve donovan <steve.j.donovan@...>
- Date: 2011年1月22日 10:18:22 +0200
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