Intel® Fortran Compiler 18.0 Developer Guide and Reference

Character Editing (A)

The A data edit descriptor transfers character or Hollerith values. It takes the following form:

A[w]

If the corresponding I/O list item is of type character, character data is transferred. If the list item is of any other type, Hollerith data is transferred.

The G edit descriptor can be used to edit character data; it follows the same rules as Aw.

Rules for Input Processing

On input, the A data edit descriptor transfers w characters from an external field and assigns them to the corresponding I/O list item.

The maximum number of characters that can be stored depends on the size of the I/O list item, as follows:

If w is equal to or greater than the length (len) of the input item, the rightmost characters are assigned to that item. The leftmost excess characters are ignored.

If w is less than len, or less than the number of characters that can be stored, w characters are assigned to the list item, left-justified, and followed by trailing blanks.

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

Format     Input      Value        Data Type
A6         PAGE^#     #            CHARACTER(LEN=1)
A6         PAGE^#     E^#          CHARACTER(LEN=3)
A6         PAGE^#     PAGE^#       CHARACTER(LEN=6)
A6         PAGE^#     PAGE^#^^     CHARACTER(LEN=8)
A6         PAGE^#     #            LOGICAL(1)
A6         PAGE^#     ^#           INTEGER(2)
A6         PAGE^#     GE^#         REAL(4)
A6         PAGE^#     PAGE^#^^     REAL(8)

Rules for Output Processing

On output, the A data edit descriptor transfers the contents of the corresponding I/O list item to an external field that is w characters long.

If w is greater than the size of the list item, the data is transferred to the output field, right-justified, with leading blanks. If w is less than or equal to the size of the list item, the leftmost w characters are transferred.

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

Format     Value         Output
A5         OHMS          ^OHMS
A5         VOLTS         VOLTS
A5         AMPERES       AMPER

See Also