LF Fortran 95

Control Descriptors

Control Edit Descriptors

Control edit descriptors affect format control or the conversions performed by subsequent data edit descriptors.

Position Editing (T, TL, TR, and X)

The Tn, TLn, TRn, and nX edit descriptors control the character position in the current record to or from which the next character will be transferred. The new position can be in either direction from the current position. This makes possible the input of the same record twice, possibly with different editing. It also makes skipping characters in a record possible.

The Tn edit descriptor tabs to character position n from the beginning of the record. The TLn and TRn edit descriptors tab n characters left or right, respectively, from the current position. The nX edit descriptor tabs n characters right from the current position.

If the position is changed to beyond the length of the current record, the next data transfer to or from the record causes the insertion of blanks in the character positions not previously filled.

Slash Editing

The slash edit descriptor terminates data transfer to or from the current record. The file position advances to the beginning of the next record. On output to a file connected for sequential access, a new record is written and the new record becomes the last record in the file.

Colon Editing

The colon edit descriptor terminates format control if there are no more items in the input/output list. The colon edit descriptor has no effect if there are more items in the input/output list.

S, SP, and SS Editing

The S, SP, and SS edit descriptors control whether an optional plus is to be transmitted in subsequent numeric output fields. SP causes the optional plus to be transmitted. SS causes it not to be transmitted. S returns optional pluses to the processor default (no pluses).

P Editing

The kP edit descriptor sets the value of the scale factor to k. The scale factor affects the Q, F, E, EN, ES, D, or G editing of subsequent numeric quantities as follows:

BN and BZ Editing

The BN and BZ edit descriptors are used to specify the interpretation, by numeric edit descriptors, of non-leading blanks in subsequent numeric input fields. If a BN edit descriptor is encountered in a format, blanks in subsequent numeric input fields are ignored. If a BZ edit descriptor is encountered, blanks in subsequent numeric input fields are treated as zeros.