(j3.2006) DC editing and optional zero
Robert Corbett
robert.corbett
Mon Jun 6 05:36:02 EDT 2011
On 06/06/11 02:19, Thomas Henlich wrote:
> Hi all,
>
> according to the Fortran 2008 standard, is the following intended?
>
> print "(dc,g0.1)", 0.5
> => ,5
Yes, it is intended. There was an interpretation issued prohibiting
the leading zero.
Your example would be clearer and illustrate the same point
if you used "f0.1" in place of "g0.1".
Before I joined the committee, I argued for allowing a conforming
processor to include a leading zero. I also argued for providing
control edit descriptors "LN" and "LZ" to suppress or require a
leading zero when printing pure fractions. Both ideas were rejected
by the committee. I later learned that at least one member of the
committee had made similar proposals, and his proposals were also
rejected.
Bob Corbett
More information about the J3
mailing list