For a programming language, Fortran has existed for a long time. It was one of the first widely used high-level languages and was the first programming language to be standardized. It is still the premier language for scientific and engineering computing applications. This chapter provides compatibility information, introduces the newest additions to the Fortran language, introduces Cray Fortran co-arrays (an extension to the Fortran language), and mentions related publications that may provide further help.
Because of the large investment in existing software written in Fortran, the Fortran standards committee decided to include the entire previous FORTRAN 77 standard in the Fortran 90 standard. In the Fortran 95 standard, however, some features are deleted. Even though the Fortran 95 standard deleted some features, the Cray Fortran Compiler has not deleted any features. Features from older standards that are deleted are honored, but they generate an ANSI message from the compiler.
Fortran 95 restricts the behavior of some features that were processor dependent in FORTRAN 77. Therefore, a program that conforms to the FORTRAN 77 standard and uses processor-dependent features can also conform to the Fortran 95 standard and yet behave differently than with some FORTRAN 77 systems. In the following situations, the Fortran 95 interpretation is different from that of FORTRAN 77:
Fortran 95 contains more intrinsic functions than FORTRAN 77 did, and Fortran 95 has a few intrinsic subroutines. Therefore, a standard-conforming FORTRAN 77 program can have a different interpretation under this standard if it invokes an external procedure that has the same name as one of the new standard intrinsic procedures, unless that procedure is specified in an EXTERNAL statement as recommended for nonintrinsic functions.
If a named variable that was not in a common block was initialized in a DATA statement, it has the SAVE attribute in Fortran 95. In FORTRAN 77, if the value of the variable was changed or became undefined, its value on reentry into a procedure was processor dependent. The Cray Fortran Compiler treats variables initialized in DATA statements as if they had appeared in a SAVE statement.
In FORTRAN 77, an input list could never require more characters than were present in a record during formatted input. Fortran 95 does not dictate this restriction for cases in which the PAD= specifier is YES; in these cases, the input record is padded with as many blanks as necessary to satisfy the input item and the corresponding format. For more information on this, see the Fortran Language Reference Manual, Volume 3.
FORTRAN 77 permitted a processor to supply extra precision for a real constant when it was used to initialize a DOUBLE PRECISION data object in a DATA statement. Fortran 95 does not permit this.
The format of a floating-point zero written with a G edit descriptor is different in Fortran 95. The floating-point zero was written with an Ew.d edit descriptor in FORTRAN 77, but it is written with an Fw.d edit descriptor in the Cray Fortran Compiler. FORTRAN 77 output cannot be changed. Therefore, different compare files must be retained for FORTRAN 77 and Fortran 95 programs that use the G edit descriptor for floating-point output.