Search Top Index
HELP UNTIL Revised by Fran Evelyn, July 85 The statement until <condition> do <action> enduntil is equivalent to: while not(<condition>) do <action> endwhile It evaluates the condition, and if it is not TRUE executes the <action>. It then goes back to test the condition again. The iteration continues until the condition is FALSE. For example 10 -> n; until n <= 0 do ppr(n) n - 1 -> n enduntil; will print out (see HELP *PPR): 10 9 8 7 6 5 4 3 2 1 The iteration can be terminated using any of * RETURN, * QUITLOOP, *QUITIF, * QUITUNLESS or re-started using * NEXTLOOP, * NEXTIF, * NEXTUNLESS See HELP *LOOPS - for other types of iteration *WHILE - for iteration until a condition evaluates as false *FOR - iteration over numbers or structures *CONTROL - for an overview of control facilities See also REF * SYNTAX, REF * POPSYNTAX --- C.all/help/until --------------------------------------------------- --- Copyright University of Sussex 1987. All rights reserved. ----------