IS_IOSTAT_EOR tests whether an variable has the value of the I/O status “end of record”. The function is equivalent to comparing the variable with the IOSTAT_EOR parameter of the intrinsic module ISO_FORTRAN_ENV.
Fortran 2003 and later
Elemental function
RESULT = IS_IOSTAT_EOR(I)
| I | Shall be of the type INTEGER. |
Returns a LOGICAL of the default kind, which .TRUE. if I has the value which indicates an end of file condition for IOSTAT= specifiers, and is .FALSE. otherwise.
PROGRAM iostat IMPLICIT NONE INTEGER :: stat, i(50) OPEN(88, FILE='test.dat', FORM='UNFORMATTED') READ(88, IOSTAT=stat) i IF(IS_IOSTAT_EOR(stat)) STOP 'END OF RECORD' END PROGRAM
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gfortran/IS_005fIOSTAT_005fEOR.html