next up previous contents
Next: Array Processing Up: Survey of the New Previous: Survey of the New

New Source Form

One of the most visible features of the new Fortran standard is its free source form. Fortran statements may now appear anywhere on a source line, and columns are no longer reserved. Line continuation has also been improved and uses the `&' character at the end of source line to be continued. Trailing comments may be used and begin with a `!' character and continue to the end of the source line. The semicolon, `;', is used as a statement separator and allows multiple statements to be placed on a single source line. This new source form is illustrated in the following program segment.

   tmp = x; x = y; y = tmp  ! Swap x and y.
   print *, 'The values of x and y are ', &
      x, y

Blanks are now significant and the underscore character is permissible in an identifier. The number of significant characters in an identifier name has increased from 6 to 31. Fortran 77's fixed source form, line continuation, and comment specification is also acceptable in Fortran 90.



next up previous contents
Next: Array Processing Up: Survey of the New Previous: Survey of the New