Statement DO WHILE Foundation
Executes a program loop until a condition evaluates to .F. (false).
[DO] WHILE <lExpression> <SourceCode>... [EXIT] <SourceCode>... [LOOP] <SourceCode>... END[DO]
The control structure DO WHILE...ENDDO defines a block of statements which is executed repeatedly until the logical expression <lExprssion> evaluates to .F. (false). As soon as the program encounters the ENDDO statement, it begins again with the statement DO WHILE and reevaluates the condition <lExpression>. If a LOOP statement is executed within the loop, the loop begins again immediately without the code between LOOP and ENDDO being executed. The loop can be exited immediately with the EXIT statement, without <lExpression>being evaluated again. In this case, the program continues at the first executable line following ENDDO.
DO WHILE loops can be nested to any depth, and other control structures can be used within them. An exception is BEGIN SEQUENCE in connection with the RECOVER statement: no LOOP or EXIT statement is permitted between BEGIN SEQUENCE and RECOVER.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.