HP Fortran Programmer's Reference (September 2007)

I/O formatting
Edit descriptors
Chapter 9 249
The BN and BZ edit descriptors are ignored during the execution of an output statement.
D, E, EN, ES, F, G, and Q (real) edit descriptors
The D, E, EN, ES, F, G, and Q edit descriptors define fields for real numbers. The I/O list item
corresponding to a real descriptor must be a numeric type. (The Standard permits real and
complex types only; as an extension, HP Fortran allows integers.)
The syntax for these edit descriptors is:
[
r
]D[
w.d
]
[
r
]E[
w.d
[{E|D|Q}
e
]]
[
r
]EN[
w.d
[E
e
]]
[
r
]ES[
w.d
[E
e
]]
[
r
]F[
w.d
]
[
r
]G[
w.d
[{E|D|Q}
e
]]
[
r
]Q[
w.d
]
where:
r
is a positive integer constant, specifying the repeat factor.
w
is a positive integer constant, specifying the field width.
d
is a nonnegative integer constant, specifying the number of decimal places
on output.
e
is a positive integer constant, specifying the number of digits in the
exponent.
For formatting complex data, you can use two real edit descriptors—the first for the real part
of the number and the second for the imaginary part. The two edit descriptors may be
different or the same, and you can insert control and character string edit descriptors between
them.
Real edit descriptors on input
The input field for the real descriptors consists of an optional plus or minus sign followed by a
string of digits that may contain a decimal point. If the decimal point is omitted in the input
string, then the number of digits equal to
d
from the right of the string are interpreted to be to
the right of the decimal point. If a decimal point appears in the input string and conflicts with
the edit descriptor, the decimal point in the input string takes precedence. This basic form can
be followed by an exponent in one of the following forms:
A signed integer constant