Why have the while loop if you're just going to break out of it? =P
That said... +1 to Ispil. In fact... literally the only difference between that code you posted and the equivalent C++ code is you replace 'continue' with 'goto':
Hah, clever. But what if the while-loop were a for-loop?
Disch wrote:
Why have the while loop if you're just going to break out of it? =P
Because the inner loop may need to run multiple times, but you don't know in advance.
I've seen some clever tricks with setting the loop variables to make loop conditions false but then you have to deal with skipping over code after the inner loop.