Next: SELECT CASE Construct I
Up: Control Constructs
Previous: Examples of Loop Counts
-
I is recalculated at the top of the loop and then
compared with < expr2 >,
- if
the loop has finished, execution jumps to the statement after
the corresponding END DO,
- I retains the value that
it had just been assigned.
For example,
DO i = 4, 45, 17
PRINT*, "I in loop = ",i
END DO
PRINT*, "I after loop = ",i
will produce
I in loop = 4
I in loop = 21
I in loop = 38
I after loop = 55
An index variable may not have its value changed in a loop.
For more information, click here
Next: SELECT CASE Construct I
Up: Control Constructs
Previous: Examples of Loop Counts
©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997Not for commercial use.