This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g77: 'D' edit descriptor?
- To: Craig Prescott <prescott at bonham dot shr dot cpqcorp dot net>
- Subject: Re: g77: 'D' edit descriptor?
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Tue, 07 Aug 2001 23:44:16 +0200
- CC: gcc at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <200108071917.PAA06960@bonham.shr.cpqcorp.net>
Craig Prescott wrote:
> double precision dnum
> dnum = 1.
> write(6,100)dnum
> 100 format(1x,d9.2)
> end
>
> With g77, this produces:
>
> $ g77 -o junk junk.F
> $ ./junk
> 0.10E+01
>
> I don't know what the f77 standard has to say about this, if anything,
> but shouldn't the output be:
>
> 0.10D+01
No, see: http://www.fortran.com/F77_std/rjcnf-13.html#sh-13.5.9.2.2
Edit descriptor Absolute value of Form of
the Exponent the Exponent
....
| Dw.d | |exp|<=99 | D+z z or E+z z |
| | | 1 2 1 2 |
| | | or + z z |
| | | 1 2 |
....
Hope this helps,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)