CS 3304: Comparative Languages
Control Structures
[
Course Documents
] : [
Control Structures
]
Previous
Contents
Next
Keyword Index
FORTRAN DO Loops
FORTRAN 77 and 90
Syntax:
DO label var = start, finish [, stepsize]
Stepsize can be any value but zero
Parameters can be expressions
Design choices:
Loop var can be INTEGER, REAL, or DOUBLE
Loop var always has its last value
Loop parameters are evaluated only once
The loop var cannot be changed in the loop, but the parameters can; because they are evaluated only once, it does not affect loop control