Hi there
Is there some nice way to accomplish the following:
WHILE (some condition) THEN BEGIN
statement1
IF NOT (statement1 = success) THEN
Continue to next turn in the loop
statement2
IF NOT (statement2 = success) THEN
Continue to next turn in the loop
... And so on ...
END;
That is some kind of "goto end of loop" or "continue to next turn" functionality. IF I would use IF - ELSE IF - ELSE IF it would be such a nasty tree of ugly indentations and after a while it will BEEP as the lines can't go over the right margin.
Comments
Is that what you´re looking for?
Remark:
Each statement must return a boolean.
TRUE : if the code must continue with the statements
FALSE: if the code must skip the next statements and continue with the loop.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Quite a good idea, actually. Thanks a lot Kriki! =D>
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
All "Statement#"-function must return a Boolean.
In each round, they are called from top to bottom until someone returns TRUE, then the CASE-statment is "solved" and the rest of the "Statements" are ignored.
This one is probably the shortest, althou maybe not the easiest to understand for a beginner.