Re: loop do .. until end loop is surely incorrect!
- Posted by mattlewis (admin) Feb 27, 2011
- 1519 views
petelomax said...
You can always (in all the examples you gave, and any possible use of with entry) replace
while <condition> with entry do <block a> entry <block b> end while
with
while 1 do <block b> if not <condition> then exit end if <block a> end while
So I'm not letting you have the duplicate code argument.
Yes, that's just as correct, functionally. I really prefer to stay away from while 1 do, since it serves (IMHO) to obfuscate the exit criterion inside the loop.
I think we're getting into a style/religious war on the level of proper brace position, however, and like Derek, I'll agree to disagree.
Matt