FIXCON - Convert F77 to F90 Continuation

FIXCON is a utility for converting the line continuation scheme used in FORTRAN 77 to that used in FORTRAN 90.

In F77, if a line is not a comment line, then a nonblank character (actually, the character can't be '0' either) in column six indicates that the current line is a continuation of the previous one. (Complications include what happens when the previous line is a comment, and how you deal with the joy of TAB characters).

            x = 1 + 2 + 3 + 4
           $  + 5 + 6
      

In F90, a line that ends with an ampersand as the last nonblank is to be continued on the next line.

            x = 1 + 2 + 3 + 4 &
              + 5 + 6
      

FIXCON reads a file that uses the F77 convention, and writes a copy that uses the F90 convention. If you've ever tried to do this by hand on a substantial file, it might be worth your while to use this program instead.

With nose firmly squeezed shut, the program has been modified to try to deal with the evil of TAB characters. The program's treatment is simply to replace each TAB by six blanks.

Two other small fixes are applied. First, the code will only read the first 72 columns of input. (FORTRAN 77 allows you to put any junk you want beyond column 72). Secondly, all lines that look like comment lines are modified to use the FORTRAN 90 comment convention of beginning with an exclamation mark.

Files you may copy include:

The list of routines includes:

Return to the FORTRAN software page.


Last revised on 15 June 2002.