next up previous contents index
Next: Comment Lines Up: Statements and Lines Previous: Statements and Lines

Continuation Lines

  Statements do not have to fit on a single line. The initial line of each statement should have a blank in column 6, and all subsequent lines, called continuation lines, must have some character other than blank (or the digit zero) in column 6. Up to 19 continuation lines are allowed, i.e. 20 in total. The column layout needed with continuation lines is illustrated here:
 
columns 
123456789... 
      IF(REPLY .EQ. 'Y' .OR. REPLY .EQ. 'y' .OR. 
     $   REPLY .EQ. 'T' .OR. REPLY .EQ. 't') THEN
The currency symbol makes a good continuation marker since if accidentally misplaced into an adjacent column it would be almost certain to produce an error during compilation.

The END statement is an exception to the continuation rule: it may not be followed by continuation lines and no other statement may have an initial line which just contains the letters ``END". Neither rule causes many problems in practice.

Programs which make excessive use of continuation lines can be hard to read and to modify: it is generally better, if possible, to divide a long statement into several shorter ones.



Helen Rowlands
8/27/1998