IS_IOSTAT_EOR — Test for end-of-record value¶
- IS_IOSTAT_EOR()¶
IS_IOSTAT_EORtests whether an variable has the value of the I/O status ‘end of record’. The function is equivalent to comparing the variable with theIOSTAT_EORparameter of the intrinsic moduleISO_FORTRAN_ENV.- Parameters
I – Shall be of the type
INTEGER.- Returns
Returns a
LOGICALof the default kind, which.TRUE.ifIhas the value which indicates an end of file condition forIOSTAT=specifiers, and is.FALSE.otherwise.
Standard:Fortran 2003 and later
Class:Elemental function
Syntax:RESULT = IS_IOSTAT_EOR(I)
Example: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