The EN data edit descriptor transfers values by using engineering notation. It takes the following form:

ENw.d[Ee]

The value of *d* (the number of places after the decimal
point) plus *e* (the number of digits in the exponent) must
not exceed the value of *w* (the field width).

The specified I/O list item must be of type real, or it must be the real or imaginary part of a complex type.

On input, the EN data edit descriptor transfers *w*
characters from an external field and assigns their real value to
the corresponding I/O list item. The EN descriptor interprets and
assigns input data in the same way as the F data edit descriptor
(see Section 11.2.4.1).

The following shows input using the EN edit descriptor (the symbol ^ represents a nonprinting blank character):

Format Input ValueEN11.3 ^^5.321E+00 5.32100 EN11.3 -600.00E-03 -.60000 EN12.3 ^^^3.150E-03 .00315 EN12.3 ^^^3.829E+03 3829.0

On output, the EN data edit descriptor transfers the real value
of the corresponding I/O list item, right-justified and rounded
to *d* decimal positions, to an external field that is
*w* characters long. The real value is output in engineering
notation, where the decimal exponent is divisible by 3 and the
absolute value of the significand is greater than or equal to 1
and less than 1000 (unless the output value is zero).

The *w* should be greater than or equal to *d*+9 to
allow for the following:

- A sign (optional if the value is positive and descriptor SP is not in effect)
- One to three digits to the left of the decimal point
- The decimal point
- The
*d*digits to the right of the decimal point - The exponent

The exponent takes one of the following forms:

Edit Descriptor | Absolute Value of Exponent | Positive Form of Exponent | Negative Form of Exponent |
---|---|---|---|

ENw.d | |exp| <= 99 | E+nn | E-nn |

99 < |exp| <= 999 | +nnn | -nnn | |

ENw.dEe | |exp| <= 10^{e} - 1 |
E+n_{1}n_{2}...n_{e} |
E-n_{1}n_{2}...n_{e} |

If the exponent value is too large to be converted into one of these forms, an error occurs.

The exponent field width (*e*) is optional; if omitted,
the default value is 2. If *e* is specified, the *w*
should be greater than or equal to *d*+*e*+5.

The following shows output using the EN edit descriptor (the symbol ^ represents a nonprinting blank character):

Format Value OutputEN11.2 475867.222 ^475.87E+03 EN11.5 475867.222 *********** EN12.3 0.00069 ^690.000E-06 EN10.3 -0.5555 ********** EN11.2 0.0 ^000.00E-03

- On the form for data edit descriptors, see Section 11.2.1.
- On general rules for numeric editing, see Section 11.2.2.

Previous Page Next Page Table of Contents