Directives
REPEAT..UNTIL Repetitive Execution
   
Format REPEAT ..UNTIL expression
 
  expression Condition ends REPEAT looping when true. Numeric expression.
   
  UNTIL Directive to end loop.
   
Description Use the REPEAT directive to create conditional looping in a program.

ProvideX executes all statements between the REPEAT directive and the next UNTIL directive. If the expression in the UNTIL directive is false (zero), ProvideX loops back to the directive following the REPEAT directive and resumes execution. If the expression is true (not zero), the loop is terminated and execution continues from the statement following the UNTIL directive.

Use the EXITTO directive to halt a REPEAT/UNTIL loop prematurely.

   
See Also BREAK Immediate Exit of Loop,
CONTINUE Initiates Next Iteration of Loop
EXITTO End Loop, Transfer Control.
Structured Error handling using ON ERR - an +PxPlus Exclusive
   
Example 0090 PRINT 'CS',"Standard TAX calculation..."
0100 INPUT "How much was your INCOME? $",CASH
0110 REPEAT
0120 INPUT "How much TAX did you pay? $",TAXES
0130 LET CASH=CASH-TAXES
0140 PRINT "You have $",CASH," left"
0150 UNTIL CASH<=0
0160 PRINT "Okay you have paid enough."
-:RUN
Standard TAX calculation...
How much was your INCOME? $1.98
How much TAX did you pay? $1.65
You have $ 0.33 left
How much TAX did you pay? $.33
You have $ 0 left
Okay you have paid enough.
-: