Page 1 of 1

Do Until Loop

Posted: Wed Aug 27, 2008 12:28 pm
by Mark
A simple option and standard programming practice is to have Do Until Loops as well as Do While Loops.

Not a big deal but I assume easy to implement and fairly standard fair in programming.

Regards,

Mark

Re: Do Until Loop

Posted: Thu Aug 28, 2008 10:05 am
by Steve
I'll add this to the list, but you can do this relatively easily now by negating the loop condition.

E.g. if you wanted to "loop until x > 5", you would write "loop while x <= 5".

Of course, this becomes more difficult when you have more complex conditions, but it is still possible:

"loop until (x > 5) && (y < 6)" would be "loop while (x <= 5) || (y >= 6)"

(NOTE: && = logical AND and || = logical OR).