This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g77: 'D' edit descriptor?


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]