Re: format with G descriptor



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


.