Guardian Procedure Calls Reference Manual (G06.25+)

Formatter Edit Descriptors
Guardian Procedure Calls Reference Manual522629-013
F-15
The G Edit Descriptor
form is used, leading zeros are supplied if needed to satisfy the requirement of m digits
to the left of the decimal point. For example:
The “|” character is used to denote the boundaries of the output field.
The G Edit Descriptor
The general format edit descriptor can be used in place of either the E or the F edit
descriptor, since it has a combination of the capabilities of both.
The G edit descriptor has either of the forms:
G
w.d OR Gw.dEe
w an unsigned integer constant that defines the total field width and cannot
exceed 255. The field processed is the
w characters starting at the current
position. After the field is processed, the current position is advanced by
w
characters.
d an unsigned integer constant that defines the number of digits that are to
appear to the right of the decimal point in the external field.
e an unsigned integer constant that defines the number of digits in the
exponent, if one is present.
On input, the G edit descriptor is the same as the E edit descriptor. The method of
representation in the output field depends on the magnitude of the data being
processed, as follows:
Format Data Value Result
F10.4 123.4567 |
123.4567|
F10.4 0.000123 |
0.0001|
F10.4.
3
-4.56789 | -
004.5679|
Magnitude of Data
Not Less Than Less Than Equivalent Conversion Effected
0.1 Ew.d or Ew.dEe
0.1 1.0 F(w-n).d,n(' ')
1.0 10.0 F(w-n).(d-1),n(' ')
10.0 100.0 F(w-n).(d-2),n(' ')
...
...
...