Data edit descriptors control conversion of data to or from its internal representation.

The I, B, O, Z, Q, F, E, EN, ES, D, and G edit descriptors can be used to specify the input/output of INTEGER, REAL, and COMPLEX data. The following general rules apply:

- On input, leading blanks are not significant.

- On output, the representation is right-justified in the field.

- On output, if the number of characters produced exceeds the field width the entire field is filled with asterisks.

The I*w*, I*w.m*, B*w*, B*w.m*, O*w*, O*w.m*, Z*w*, and Z*w.m* edit descriptors indicate the manner of editing for INTEGER data. The *w* indicates the width of the field on input, including a sign (if present). The *m* indicates the minimum number of digits on output; *m* must not exceed *w* unless *w* is zero. The output width is padded with blanks if the number is smaller than the field, unless *w* is zero. If *w* is zero then a suitable width will be used to show all digits without any padding blanks. Note that an input width must always be specified.

The Qw.d, F*w.d*, E*w.d*, D*w.d*, E*w.d*E*e*, EN, and ES edit descriptors indicate the manner of editing of REAL and COMPLEX data.

Q, F, D, E, EN, and ES editing are identical on input. The *w* indicates the width of the field; the *d* indicates the number of digits in the fractional part. The field consists of an optional sign, followed by one or more digits that can contain a decimal point. If the decimal point is omitted, the rightmost *d* digits are interpreted as the fractional part. An exponent can be included in one of the following forms:

- An explicitly signed INTEGER constant.

- Q, E, or D followed by an optionally signed INTEGER constant.

F editing, the output field consists of zero or more blanks followed by a minus sign or an optional plus sign (see S, SP, and SS Editing), followed by one or more digits that contain a decimal point and represent the magnitude. The field is modified by the established scale factor (see P Editing) and is rounded to *d* decimal digits. If *w* is zero then a suitable width will be used to show all digits and sign without any padding blanks.

For Q, E, and D editing, the output field consists of the following, in order:

- 1. zero or more blanks

- 2. a minus or an optional plus sign (see S, SP, and SS Editing)

- 3. a zero (depending on scale factor, see P Editing)

- 4. a decimal point

- 5. the
*d*most significant digits, rounded

- 6. a Q, E, or a D

- 7. a plus or a minus sign

- 8. an exponent of
*e*digits, if the extended E*w.d*E*e*form is used, and two digits otherwise.

For Q, E, and D editing, the scale factor *k* controls the position of the decimal point. If *d* < *k* ≤ 0*k*| leading zeros and |-*k*| significant digits after the decimal point. If *k* < *d*+2*k* significant digits to the left of the decimal point and -*k*+1 significant digits to the right of the decimal point. Other values of *k* are not permitted.

The EN edit descriptor produces an output field in engineering notation such that the decimal exponent is divisible by three and the absolute value of the significand is greater than or equal to 1 and less than 1000, except when the output value is zero. The scale factor has no effect on output.

The forms of the edit descriptor are EN*w.d* and EN*w.d*E*e* indicating that the external field occupies *w* positions, the fractional part of which consists of *d* digits and the exponent part *e* digits.

On input, EN editing is the same as F editing.

The ES edit descriptor produces an output field in the form of a real number in scientific notation such that the absolute value of the significand is greater than or equal to 1 and less than 10, except when the output value is zero. The scale factor has no effect on output.

The forms of the edit descriptor are ES*w.d* and ES*w.d*E*e* indicating that the external field occupies *w* positions, the fractional part of which consists of *d* digits and the exponent part *e* digits.

On input, ES editing is the same as F editing.

COMPLEX editing is accomplished by using two REAL edit descriptors. The first of the edit descriptors specifies the real part; the second specifies the imaginary part. The two edit descriptors can be different. Control edit descriptors can be processed between the edit descriptor for the real part and the edit descriptor for the imaginary part. Character string edit descriptors can be processed between the two edit descriptors on output only.

The L*w* edit descriptor indicates that the field occupies *w* positions. The specified input/output list item must be of type LOGICAL.

The input field consists of optional blanks, optionally followed by a decimal point, followed by a T for true or F for false. The T or F can be followed by additional characters in the field. Note that the logical constants .TRUE. and .FALSE. are acceptable input forms. If a processor is capable of representing letters in both upper and lower case, a lower-case letter is equivalent to the corresponding uppercase letter in a LOGICAL input field.

The output field consists of *w* - 1 blanks followed by a T or F, depending on whether the value of the internal data object is true or false, respectively.

The A*[w]* edit descriptor is used with an input/output list item of type CHARACTER.

If a field width *w* is specified with the A edit descriptor, the field consists of *w* characters. If a field width *w* is not specified with the A edit descriptor, the number of characters in the field is the length of the corresponding list item.

Let *len* be the length of the list item. On input, if *w* is greater than or equal to *len*, the rightmost *len* characters will be taken from the field; if *w* is less than *len*, the *w* characters are left-justified and padded with *len-w* trailing blanks.

On output, the list item is padded with leading blanks if *w* is greater than *len*. If *w* is less than or equal to *len*, the output field consists of the leftmost *w* characters of the list item.

The G*w.d* and G*w.d*E*e* edit descriptors can be used with an input/output list item of any intrinsic type.

These edit descriptors indicate that the external field occupies *w* positions, the fractional part of which consists of a maximum of *d* digits and the exponent part *e* digits. *d* and *e* have no effect when used with INTEGER, LOGICAL, or CHARACTER data.

With INTEGER data, the G*w.d* and G*w.d*E*e* edit descriptors follow the rules for the I*w* edit descriptor.

The form and interpretation of the input field is the same as for F editing.

The method of representation in the output field depends on the magnitude of the data object being edited. If the decimal point falls just before, within, or just after the *d* significant digits to be printed, then the output is as for the F edit descriptor; otherwise, editing is as for the E edit descriptor.

Note that the scale factor *k* (see See P Editing) has no effect unless the magnitude of the data object to be edited is outside the range that permits effective use of F editing.

With LOGICAL data, the G*w.d* and G*w.d*E*e* edit descriptors follow the L*w* edit descriptor rules.

With CHARACTER data, the G*w.d* and G*w.d*E*e* edit descriptors follow the A*w* edit descriptor rules.