Contents | Prev | Next | Index


While Statements

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 END

WHILE (t # NIL) & (t.key # i) DO t := t.left END


Contents | Prev | Next | Index

Canterbury Oberon-2 for JVM  (Last documentation update Jun 2, 2000)
Copyright © 1998 Mill Hill & Canterbury Corporation, Ltd. All rights reserved
Please send any comments or corrections to mhc@webcom.com