Interpretation 67
To: J3
From: Interpretations Subgroup
Date: May 30, 2000
Subject: Interpretation 67
The Interpretations Subgroup reviewed the ballot results of Interpretation 67. The Interpretations Subgroup
agreed to fix this defect in Fortran 95 and document it as an incompatibility in both Fortran 90 and Fortran 77.
NUMBER: 000067
TITLE: Writing zeros
KEYWORDS: list-directed output, namelist output
DEFECT TYPE: Erratum
STATUS: Passed by J3 letter ballot
The standard currently requires a real zero to be
written in exponential form when using list-directed
or namelist output.
QUESTION: Is this requirement intentional or an oversight?
ANSWER: The requirement is an oversight.
DISCUSSION:
The G edit descriptor was changed in Fortran 90 to format a real zero as
if an F edit descriptor were provided in most cases. The same change
was not made for list-directed or namelist output, but should have.
REFERENCES: ISO/IEC 1539-1:1997(E),
Sections 10.5.4.1.2, 10.8.2, and 10.9.2.1
EDITS:
For Fortran 95:
[3:32+] In section 1.5.1, add the following as list item (3):
(3) List directed and namelist output statements produce a real constant zero for a real value that is zero,
and for the real or imaginary part of a complex value that is zero. In Fortran 95, these real constants are
produced with the effect of an F edit descriptor, instead of an E edit descriptor.
[4:24+] In section 1.5.2, add the following as list item (7):
(7) List directed and namelist output statements produce a real constant zero for a real value that is zero,
and for the real or imaginary part of a complex value that is zero. In Fortran 95, these real constants are
produced with the effect of an F edit descriptor, instead of an E edit descriptor.
[177:41] In section 10.8.2 (List-directed output), fifth paragraph, change "If the magnitude x is within this
range" to "If the magnitude x is within this range or is zero"
[182:33] In section 10.9.2.1 (Namelist output editing), third paragraph, change "If the magnitude x is within
this range" to "If the magnitude x is within this range or is zero"
For 00-007r1 (Fortran 2000):
[3:24+] In section 1.5.2 (Fortran90 compatibility), add the following sentence to the end of the first paragraph.
"The following Fortran 90 features have different interpretations in this standard."
[3:25-29] In section 1.5.2, turn the 2nd paragraph into list item (1).
[3:29+] Add the following as list item (2).
(2) List directed and namelist output statements produce a real constant zero for a real value that is zero,
and for the real or imaginary part of a complex value that is zero. In Fortran 2000, these real constants are
produced with the effect of an F edit descriptor, instead of an E edit descriptor.
[4:21+] In section 1.5.2, add the following as list item (7):
(7) List directed and namelist output statements produce a real constant zero for a real value that is zero,
and for the real or imaginary part of a complex value that is zero. In Fortran 2000, these real constants are
produced with the effect of an F edit descriptor, instead of an E edit descriptor.
[229:10] In section 10.9.2 (List-directed output), fifth paragraph, change "If the magnitude x is within this
range" to "If the magnitude x is within this range or is zero"
[234:4] In section 10.10.2.1 (Namelist output editing), third paragraph, change "If the magnitude x is within this
range" to "If the magnitude x is within this range or is zero"
SUBMITTED BY: Robert Corbett
HISTORY: J3/99-193 m150 Submitted
J3/99-213r1 m150 approved uc
J3/00-210 m153 Passed by letter ballot
[End of J3 / 00-210]