J3/99-174 Date: 24 June 1999 To: J3 From: Jerry Wagener Subject: Edits to section 1.5.2 At the June meeting in Oxford paper J3/99-169 proposed some edits appropriate to update the draft to Fortran 2000. Of the three items in that paper, items 1 and 2, as amended were passed, but item 3 was deferred to the August meeting because of the extensive nature of the amendments to it. Following is item 3, amended as suggested at the meeting. [It might be noted that the numerous changes in the Foreword (paper J3/99-168r1) and section 1 converting "Fortran 95" to "Fortran 2000" will probably have to be changed again, because of the schedule slip approved by WG5 the week after the Oxford meeting; however, WG5 has not yet determined what the new name should be. Note that the latest WG5 resolutions consistently refer to "Fortran 200x".] ----------------------------------------------------------------------------- 3. Replace section 1.5.2 (pages 3-4) with the following, which (a) updates "Fortran 95" to "Fortran 2000" as appropriate, (b) adds a new section on "Fortran 90 Compatibility", and (c) and has a few other minor updates. 1.5.2 Fortran 90 compatibility Except for the deleted features noted in Annex B.1, and except as noted in this section, the Fortran 2000 Standard is an upward compatible extension to the Fortran International Standard, ISO/IEC 1539:1991 (Fortran 90). Any standard-conforming Fortran 90 program that does not use one of the deleted features remains standard conforming under the Fortran 2000 Standard; note however that the Fortran 2000 Standard has more intrinsic procedures than did Fortran 90. Therefore, a standard-conforming Fortran 90 program may have a different interpretation under the Fortran 2000 Standard if it invokes an external procedure having the same name as one of the standard intrinsic procedures added in either Fortran 95 or Fortran 2000, unless that procedure is specified to have the EXTERNAL attribute as recommended in the Fortran 90 standard with regard to nonintrinsic procedures. 1.5.3 FORTRAN 77 compatibility Except for the deleted features noted in Annex B.1, and except as noted in this section, the Fortran 2000 Standard is an upward compatible extension to the Fortran International Standard, ISO 1539:1980 (FORTRAN 77). Any standard-conforming FORTRAN 77 program that does not use one of the deleted features remains standard conforming under the Fortran 2000 Standard; however, see item (4) below regarding intrinsic procedures. The Fortran 2000 Standard restricts the behavior for some features that were 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 2000 Standard, yet remain a standard-conforming program. The following FORTRAN 77 features have different interpretations in the Fortran 2000 Standard: (1) FORTRAN 77 permitted a processor to supply more precision derived from a real constant than can be represented in a real datum when the constant is used to initialize a data object of type double precision real in a DATA statement. The Fortran 2000 Standard does not permit a processor this option. (2) If a named variable that was not in a common block was initialized in a DATA statement and did not have the SAVE attribute specified, FORTRAN 77 left its SAVE attribute processor dependent. The Fortran 2000 Standard specifies (5.3.13) that this named variable has the SAVE attribute. (3) FORTRAN 77 required that the number of characters required by the input list was to be less than or equal to the number of characters in the record during formatted input. The Fortran 2000 Standard specifies (9.5.4.4.2) that the input record is logically padded with blanks if there are not enough characters in the record, unless the PAD= specifier with the value 'NO' is specified in an appropriate OPEN statement. (4) The Fortran 2000 Standard has more intrinsic procedures than did FORTRAN 77. Therefore, a standard-conforming FORTRAN 77 program may have a different interpretation under the Fortran 2000 Standard if it invokes an external procedure having the same name as one of the standard intrinsic procedures added in either Fortran 90, or Fortran 95, or Fortran 2000, unless that procedure is specified to have the EXTERNAL attribute as recommended in the Fortran 77 standard with regard to nonintrinsic procedures. (5) A value of zero for a list item in a formatted output statement will be formatted in a different form for some G edit descriptors. In addition, the Fortran 2000 standard specifies how rounding of values will affect the output field form, but FORTRAN 77 did not address this issue: therefore, some FORTRAN 77 processors may produce a different output form than Fortran 2000 processors for certain combinations of values and G edit descriptors. (6) If the processor can distinguish between positive and negative real zero, the behavior of the SIGN intrinsic function when the second argument is negative real zero is changed by this standard.