Hi George,
Is there any "functional" difference between
WHILE expression DO and IF NOT(expression) THEN EXIT
and
UNTIL expression DO and IF expression THEN EXIT
None at all.
Use of WHILE/UNTIL is sometimes easier to read. Conversely, some exit
conditions can only be done using EXIT if they are, for example, in some
deeper conditional construct.
First I thought that the DO/WHILE would activate as soon as
the condition occurred and drop out of a loop, but that is not
the case, the condition has to be active AND control has to be
back at the WHILE statement.
Correct. The test is carried out at the point where you write it. A single
loop can contain many WHILE/UNIT conditions scattered through it but
uncontrolled use of this can make programs difficult to read.
Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/