DO UNTIL loops in a flowchart appear as follows:
DO UNTIL expression /* expression must be false */
instruction(s)
END
Use DO UNTIL loops when a condition is not true and you
want to execute the loop until the condition is true. The DO UNTIL
loop tests the condition at the end of the loop and repeats only when
the condition is false. Otherwise, the loop executes once and ends.
For example:
/******************************** REXX ******************************/
/* This program uses a DO UNTIL loop to ask for a password. If the */
/* password is incorrect three times, the loop ends. */
/********************************************************************/
password = 'abracadabra'
time = 0
DO UNTIL (answer = password) | (time = 3)
PULL answer /* Gets ANSWER from input stream */
time = time + 1
END