Appendix A. Compatibility across standards
This information is provided for the benefit of users of
earlier language standards, such as FORTRAN 77 , who are unfamiliar with more current
language standards like Fortran 95, Fortran 90, or Fortran 2003,
or with XL Fortran.
Except as noted here, the Fortran 90, Fortran 95, and Fortran 2003 standards
are upward-compatible extensions to the preceding Fortran International Standard,
ISO 1539-1:1980, informally referred to as FORTRAN 77. Any standard-conforming
FORTRAN 77 program remains standard-conforming under the Fortran 90 standard, except
as noted under item 4 below regarding intrinsic procedures.
Any standard-conforming FORTRAN 77 program remains standard-conforming under
the Fortran 95 or Fortran 2003 standard, as long as none
of the deleted features are used in the program, except as noted under item 4 below regarding intrinsic procedures. The Fortran 90, Fortran
95, and Fortran 2003 standards restrict the behavior of
some features that are processor-dependent in FORTRAN 77. Therefore, a standard-conforming
FORTRAN 77 program that uses one of these processor-dependent features may
have a different interpretation under the Fortran 90, Fortran 95, or Fortran 2003 standard,
yet remain a standard-conforming program. The following FORTRAN 77 features
have different interpretations in Fortran 90, Fortran 95, and Fortran 2003:
- FORTRAN 77 permitted a processor to supply more precision derived from
a real constant than can be contained in a real datum when the constant is
used to initialize a DOUBLE PRECISION data object in a DATA statement. Fortran 90,
Fortran 95, and Fortran 2003 do not permit this processor-dependent
option.
Previous releases of XL Fortran have been consistent with
the Fortran 90 and Fortran 95 behavior.
- If a named variable that is not in a common block is initialized in a DATA statement and does not have the SAVE attribute specified,
FORTRAN 77 left its SAVE attribute processor-dependent. The Fortran 90,
Fortan 95, and Fortran 2003 standards specify that this
named variable has the SAVE attribute.
Previous releases
of XL Fortran have been consistent with the Fortran 90 and Fortran 95 behavior.
- FORTRAN 77 required that the number of characters required by the input
list must be less than or equal to the number of characters in the record
during formatted input. The Fortran 90, Fortran 95, and Fortran 2003 standards
specify that the input record is logically padded with blanks if there are
not enough characters in the record, unless the PAD='NO' specifier
is indicated in an appropriate OPEN statement.
With XL Fortran,
the input record is not padded with blanks if the noblankpad suboption
of the -qxlf77 compiler option is specified.
-
The Fortran 90, Fortan 95, and Fortran 2003 standards
have more intrinsic functions than FORTRAN 77, in addition to a few intrinsic
subroutines. Therefore, a standard-conforming FORTRAN 77 program may have
a different interpretation under Fortran 90, Fortran 95, or Fortran 2003 if
it invokes a procedure having the same name as one of the new standard intrinsic
procedures, unless that procedure is specified in an EXTERNAL statement.
With XL Fortran, the -qextern compiler option also treats specified
names as if they appear in an EXTERNAL statement.
- In Fortran 95 and Fortran 2003, for some edit descriptors,
a value of 0 for a list item in a formatted output statement will be formatted
differently. In addition, the Fortran 95 standard, unlike the FORTRAN 77 standard,
specifies how rounding of values will affect the output field form. Therefore,
for certain combinations of values and edit descriptors, FORTRAN 77 processors
may produce a different output form than Fortran 95 processors.
- Fortran 95 and Fortran 2003 allow a processor to distinguish
between a positive and a negative real zero, whereas Fortran 90 did not. Fortran
95 changes the behavior of the SIGN intrinsic function when the second
argument is negative real zero.