IS_IOSTAT_EOR (The GNU Fortran Compiler)

### 8.164 `IS_IOSTAT_EOR` — Test for end-of-record value ¶

Synopsis:

  `RESULT = IS_IOSTAT_EOR(I)`

Description:

  `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`.

Class:

  Elemental function

Arguments:

  I | Shall be of the type `INTEGER`.

Return value:

  Returns a `LOGICAL` of the default kind, which is `.TRUE.` if I has the value that indicates an end of file condition for `IOSTAT=` specifiers, and is `.FALSE.` otherwise.

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

Standard:

  Fortran 2003 and later