Contents | Prev | Next | Index
The purpose of a while statement is to perform a repeated execution of a statement sequence while a boolean expression yields TRUE. This boolean expression is checked before every execution of the statement sequence.
while_stmt ::= WHILE boolean_expr DO stmt_seq END |
Examples:
WHILE i>0 DO i := i DIV 2; k := k+1 ENDWHILE (t # NIL) & (t^.key # i) DO t := t^.left END
Contents | Prev | Next | Index
Canterbury Modula-2 for Java (Last documentation update
Feb 8, 2000)
Copyright © 1998 Mill Hill &
Canterbury Corporation, Ltd. All rights reserved
Please send any comments or corrections to
mhc@webcom.com