8.3.2.2 E Field Descriptor

The E field descriptor transfers real values in exponential form. It takes the following form:

Ew.d[Ee]

The corresponding I/O list element must have a real data type or it must be either the real or the imaginary part of a complex data type.

Input Processing

In an input statement, the E field descriptor transfers w characters from the external field and assigns them as a real value to the corresponding I/O list element. The E field descriptor interprets and assigns data in exactly the same way as the F field descriptor (see Section 8.3.2.1).

The following list illustrates valid input processing using the E field descriptor (the symbol ^ represents a nonprinting space character):

Format    External Field       Internal Value
E9.3      734.432E3            734432.0
E12.4     ^^1022.43E             1022.43E-6
E15.3     52.3759663^^^^^          52.3759663
E12.5     210.5271D+10[1]         210.5271E10

In the last example, the E field descriptor treats the D exponent field indicator as an E indicator if the I/O list element is single precision.

Output Processing

In an output statement, the E field descriptor transfers the value of the corresponding I/O list element, rounded to d decimal digits and right-justified, to an external field that is w characters long.

If the value does not fill the field, leading spaces are inserted. If the value is too large for the field, the entire field is filled with asterisks.

The term w must be large enough to include all of the following:

The exponent field width (e) specification is optional. If it is omitted, the value of e defaults to two. If the exponent value is too large to be converted into one of the preceding forms, an error occurs.

To accommodate all possible components of the standard form, the term w must be greater than or equal to d+7; if e is present, w must be greater than or equal to d+e+5.

However, w can be as small as d+5 or d+e+3 and still allow formatting of the value without error, if optional fields are omitted. In this case, the sign is omitted (if the value is positive and SP editing is not in effect) and the zero to the left of the decimal point is also omitted, if necessary.

The following list illustrates valid output processing using the E field descriptor (the symbol ^ represents a nonprinting space character):

Format     Internal Value       External Representation
E11.2      475867.222           ^^^0.48E+06
E11.5      475867.222              0.47587E+06
E12.3           0.00069         ^^^0.690E
E10.3          -0.5555            -0.556E+00
E5.3           56.12              *****
E14.5E4        -1.001             -0.10010E+0001
E13.3E6         0.000123           0.123E-000003


Previous Page Next Page Table of Contents