J3/99-213r1 page 1 of 2 Date: August 23, 1999 To: J3 From: interp/bleikamp Subject: Interp 000067 NUMBER: 000067 TITLE: writing zeros KEYWORDS: list-directed output, namelist output DEFECT TYPE: Erratum STATUS: J3 consideration in progress 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: | In section 1.5.1, after the last paragraph, add the following as list | item (3): | (3) List directed and namelist output statements produce a real | literal 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 literal constants are produced with | the effect of an F edit descriptor, instead of an E edit descriptor. and in section 10.8.2 (List-directed output), fifth paragraph, [177:41], change "If the magnitude x is within this range" to "If the magnitude x is within this range or is zero" and in section 10.9.2.1 (Namelist output editing), third paragraph, [182:33], change "If the magnitude x is within this range" to "If the magnitude x is within this range or is zero" J3/99-213r1 page 2 of 2 For 99-007r2 (Fortran 2000): 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." and in section 1.5.2, turn the 2nd paragraph into list item (1), and add the following after the 2nd paragraph as list item (2). | (2) List directed and namelist output statements produce a real | literal 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 literal constants are produced with | the effect of an F edit descriptor, instead of an E edit descriptor. and in section 10.9.2 (List-directed output), fifth paragraph, [246:10], change "If the magnitude x is within this range" to "If the magnitude x is within this range or is zero" and in section 10.10.2.1 (Namelist output editing), third paragraph, [251:4], 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 draft response