Previous: OPEN( ... NAME=), Up: Extensions not implemented in GNU Fortran [Contents][Index]
Q
edit descriptorSome Fortran compilers provide the Q
edit descriptor, which
transfers the number of characters left within an input record into an
integer variable.
A direct replacement of the Q
edit descriptor is not available
in gfortran
. How to replicate its functionality using
standard-conforming code depends on what the intent of the original
code is.
Options to replace Q
may be to read the whole line into a
character variable and then counting the number of non-blank
characters left using LEN_TRIM
. Another method may be to use
formatted stream, read the data up to the position where the Q
descriptor occurred, use INQUIRE
to get the file position,
count the characters up to the next NEW_LINE
and then start
reading from the position marked previously.