Guardian Procedure Calls Reference Manual (G06.25+)

Formatter Edit Descriptors
Guardian Procedure Calls Reference Manual522629-013
F-13
The E Edit Descriptor
On output, the field (for a scale factor of zero) appears in the following form:
{[+]} [0].n n … n E {+} e e …e
{ - } 1 2 d {-} 1 2 e
{[+]} Indicates an optional plus or a minus
{ - }
n n ... n Are the d most significant digits of the value of the data
1 2 d after rounding
E Signals the start of the decimal exponent
{+} Indicates that a plus or minus is required
{-}
e e ... e
Are the e most significant digits of the exponent
1 2 e
The sign in the exponent is always displayed. If the exponent is zero, a plus sign is
used.
If the data is negative, the minus sign is always displayed. If the data is positive (or
zero), the display of the plus sign is dependent on the last optional plus descriptor
processed.
The zero preceding the decimal point is normally displayed, but can be omitted to
prevent field overflow. Decimal normalization is controlled by the scale factor
established by the most recently interpreted
nP edit descriptor. If -d < n <= 0, the
output value has |
n| leading zeros, and (d-|n|) significant digits follow the decimal
point; if 0 <
n < d+2, the output value has n significant digits to the left of the decimal
point and
d-n+1 digits to the right. If the number of characters produced exceeds the
field width or if an exponent exceeds its specified length using the E
w.dEe field
descriptor, the entire field of width
w is filled with asterisks. However, if the field width
is not exceeded when optional characters are omitted, the field is displayed without the
optional characters.
Because all characters in the output field are included in the field width,
w must be
large enough to accommodate the exponent, the decimal point, and all digits and the
algebraic sign of the base number.
The following examples illustrate output:
Format Data Value Result
E12.3 8.76543 x 10
-6
| 0.877E-05|
E12.3 -0.55555 | -0.556E+00|
E12.3 123.4567 | 0.123E+03|
E12.6E1 3.14159 | 0.314159E+1|