A conditional phrase can modify the iteration of a repetitive DO loop. It may cause the termination of a loop. It can follow any of the forms of repetitor (none, FOREVER, simple, or controlled). If you specify WHILE or UNTIL, exprw or expru, respectively, is evaluated each time around the loop using the latest values of all variables (and must evaluate to either 0 or 1), and the loop is ended if exprw evaluates to 0 or expru evaluates to 1.
For a WHILE loop, the condition is evaluated at the top of the group of instructions. For an UNTIL loop, the condition is evaluated at the bottom—before the control variable has been stepped.
Do I=1 to 10 by 2 until i>6
say i
end
/* Displays: "1" "3" "5" "7" */