[Next] [Up] [Previous] [Home] [Other]

Fortran 90

Fortran 90 was a major extension to Fortran.

Fortran 77 brought Fortran into the structured programming era. Fortran 90 gave it advanced capabilities. It was a sufficiently large change that while it existed as a draft standard known as Fortran 8x, debate over the additions was tortuous. Aside from the fact that the additions were far-reaching, the fate of the language ALGOL after the Algol 68 standard was adopted, essentially disappearing from the face of the Earth, and being replaced by Pascal, may not have been far from the minds of the delegates.

Data structures were added to the language. Also, array calculations could be expressed directly, without the use of DO loops.

Variable names could now include the underscore character (_), but not as the first character, in addition to letters and numbers. As well, variable names could be up to 31 characters in length.

The exclamation mark (!) could be used to begin a comment anywhere on a line, so that comments could be placed after FORTRAN source on the same record.

Programs could be in a free source form where it was no longer necessary to indent each line to column 7, and where statements can continue beyond column 72. Because in the free source form, a statement could begin in column 1, the letter C could no longer be used to begin a comment in free source form, and only the exclamation mark could be used to indicate a comment.

In free source form, an ampersand as the last non-blank character on a line (outside a trailing comment) indicates that the line is continued to the next line. On the next line, an ampersand as the first non-blank character of that line will be ignored. This makes it possible, by putting that ampersand in column 6, and the ampersand on the previous line after column 72, to write a program that can be read properly whether the compiler is looking for free source form or fixed source form.

Since such a program can only use the exclamation point as a comment character, it is not possible by this means to achieve compatibility between the free source form of Fortran 90 and previous versions of FORTRAN by this means. However, it is necessary within Fortran 90 itself for such things as include files.

As with PL/I, Pascal, or C, Fortran 90 allows data structures to be defined as new types by the user.

Copyright (c) 2007 John J. G. Savard

[Next] [Up] [Previous] [Home] [Other]