The DO WHILE construct specifies the repeated execution of a statement block for as long as the scalar logical expression specified in the DO WHILE statement is true. You can curtail a specific iteration with the CYCLE statement, and the EXIT statement terminates the loop.
>>-DO_WHILE_statement------------------------------------------>< >>-statement_block--------------------------------------------->< >>-+-END_DO_statement---+-------------------------------------->< '-terminal_statement-' |
The rules discussed earlier concerning DO construct names and ranges, active and inactive DO constructs, and terminal statements also apply to the DO WHILE construct.
I=10 TWO_DIGIT: DO WHILE ((I.GE.10).AND.(I.LE.99)) J=J+I READ (5,*) I END DO TWO_DIGIT END