FORTRAN Reference Manual

Statements
FORTRAN Reference Manual528615-001
7-49
Editing Numeric Data
The G Descriptor
The G w. d and G w. dE e edit descriptors indicate that the field occupies w positions,
the fractional part of which consists of d digits, unless a scale factor greater than one is
in effect, and the exponent consists of e digits.
G input editing is exactly the same as F input editing.
The form of the output field depends on the magnitude of the datum to be represented.
If the value is less than 0.1, or equal to or greater than 10** d, G editing is exactly the
same as E editing. Any scale factor specified controls decimal normalization. If the
value is greater than or equal to 0.1 and less than 10** d, the scale factor has no
effect, and the value determines the editing as shown in Table 7-6.
Table 7-7 shows a comparison of the editing done on output data by similar F and G
edit descriptors.
0Z12.8
^^^^
00000000
5Z12.8
^^^^
00000005
-3 Z12.8
^^^^
FFFFFFFD
Table 7-6. Values Edited With the G Descriptor
Not Less Than But Less Than Equivalent Editing Effected
0.1 1.0 F(w-n).d, n('b')
1.0 10.0 F(w-n).d-1, n('b')
10.0 100.0 F(w-n).d-2, n('b')
...
...
...
10**(d-2) 10**(d-1) F(w-n).1, n('b')
10**(d-1) 10**d F(w-n).0, n('b')
where n is 4 for Gw.d and e+2 for Gw.dEe, and b is a blank.
Table 7-7. Comparison of F and G Editing (page1of2)
Value F13.6 Editing G13.6 Editing
.01234567 0.012346 0.123457E-01
.12345678 0.123457 0.123457
1.23456789 1.234568 1.23457
12.34567890 12.345679 12.3457
Table 7-5. Values Converted With the Z Descriptor (page 2 of 2)
Internal Value
Format
Descriptor External Value