## 8.3.3 Logical Editing - the L Field Descriptor

The L field descriptor transfers logical data. It takes the following form:

    Lw

The corresponding I/O list element must have a logical or integer data type.

Input Processing

In an input statement, the L field descriptor transfers w characters from the external field in the following ways:

- If the first nonblank characters of the field are T, t, .T, or .t, the value .TRUE. is assigned to the corresponding I/O list element.

- If the first nonblank characters are F, f, .F, or .f, the value .FALSE. is assigned.

- If the field contains all blanks, the value .FALSE. is assigned.

- If any other value is in the external field, an error occurs.

The logical constants .TRUE. and .FALSE. are acceptable input forms.

Output Processing

In an output statement, the L field descriptor transfers either the letter T (if the value of the corresponding I/O list element is .TRUE.) or the letter F (if the value is .FALSE.) to an external field that is w characters long. The letter T or F is in the rightmost position of the field, preceded by w-1 spaces.

The following list illustrates valid output processing using logical editing (the symbol ^ represents a nonprinting space character):

    Format     Internal Value       External Representation

    L5         .TRUE.               ^^^^T

    L1         .FALSE.              F

Previous Page Next Page Table of Contents