## 8.5.3 Q Edit Descriptor

The Q edit descriptor gets the number of characters remaining to be read from the current input record. It takes the following form:

    Q

The corresponding I/O list element must have a integer or logical data type; for example:

         READ (4,1000) XRAY, KK, NCHRS, (ICHR(I),  I=1,NCHRS)

    1000 FORMAT (E15.7,I4,Q,(80A1))

The preceding input statement reads two fields into the variables XRAY and KK. The number of characters remaining in the record is stored in NCHRS, and exactly that many characters are read into the array ICHR. (This instruction can fail if the record is longer than 80 characters.) By placing the Q descriptor first in the format specification, you can determine the actual length of the input record.

In an output statement, the Q edit descriptor has no effect except that the corresponding I/O list element is skipped.

For More Information:

For details on repeating a Q edit descriptor format, see Section 8.3.6.

Previous Page Next Page Table of Contents