next up previous contents index
Next: Other Control Statements Up: Control Structures Previous: Branches


  Another fundamental requirement is that of repetition. If the number of cycles is known in advance then the DO statement should be used. This also controls a block of statements known as the DO-loop. A CONTINUE statement usually marks the end of a DO-loop.

Fortran has no direct equivalent of the ``do while" and ``repeat until" forms available in some program languages for loops of an indefinite number of iterations, but they can be constructed using simple GO TO and IF statements.

Helen Rowlands