Re: format with G descriptor
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Fri, 30 May 2008 19:06:04 GMT
Roman wrote:
....
The following short program does not produce the expected....
output when reading in an integer with a G descriptor.
The last write statement outputs 1.e-7 instead of 1.
Is this a compiler bug, or (most likely) I'm misunderstanding
the use of the G descriptor?
2 format(g)
The G edit descriptor must have a field width (and optionally
some other stuff):
2 format(g15.7)
The F2008 standard introduces a G0 form (which I'm not sure
they did right - I need to look at it very closely). A G0 form
should be a lot more useful than the F0 form already permitted.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
.
- Follow-Ups:
- Re: format with G descriptor
- From: James Giles
- Re: format with G descriptor
- References:
- format with G descriptor
- From: Roman
- format with G descriptor
- Prev by Date: Re: one-liner for characater replacement
- Next by Date: Re: format with G descriptor
- Previous by thread: format with G descriptor
- Next by thread: Re: format with G descriptor
- Index(es):