[UP]


Manual Reference Pages  - is_iostat_end (3)

NAME

is_iostat_end(3f) - [FORTRAN:INTRINSIC] Test for end-of-file value

SYNTAX

function is_iostat_end(i)

    logical            :: is_iostat_end (i)
    integer,intent(in) :: i

DESCRIPTION

is_iostat_end tests whether an variable has the value of the I/O status "end of file". The function is equivalent to comparing the variable with the iostat_end parameter of the intrinsic module [[iso_fortran_env]].

ARGUMENTS

I Shall be of the type INTEGER.

RETURN VALUE

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.

EXAMPLE

Sample program:

    program demo_iostat
      implicit none
      integer :: stat, i
      open(88, file=’test.dat’)
      read(88, *, iostat=stat) i
      if(is_iostat_end(stat)) stop ’end of file’
    end program demo_iostat

STANDARD

[[Fortran 2003]] and later

CLASS

[[Elemental function]]


is_iostat_end (3) March 11, 2021
Generated by manServer 1.08 from b4968276-57f2-4270-8373-bfe013c824c5 using man macros.