Do Until Loop

Forum for suggestions regarding the next update / release of Flowcode

Moderators: Benj, Mods

Post Reply
Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

Do Until Loop

Post 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
Go with the Flow.

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Do Until Loop

Post 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).

Post Reply