Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

What happened to EOF()

ferrad1
New Contributor I
538 Views

I have used this function to determine the end of file in Intel Fortran for many years:

if( .not. eof(lno)) ...

Now I am getting an error.

error #6410: This name has not been declared as an array or a function. [EOF]

Has it been removed from Intel Fortran?

0 Kudos
6 Replies
andrew_4619
Honored Contributor II
528 Views
IS_IOSTAT_END
Elemental Intrinsic Function (Generic): Tests for an end-of-file condition.
result=IS_IOSTAT_END(i)
 
eof function is non-standard but I think still exists, do you have standard checking options on?
0 Kudos
ferrad1
New Contributor I
525 Views

I have these checks on.

/check:pointer /check:bounds /check:uninit /check:arg_temp_created /check:stack

0 Kudos
andrew_4619
Honored Contributor II
524 Views

Additional:

Compiling with Intel® Fortran Compiler Classic 2021.8.0 [Intel(R) 64]...
... warning #7416: Fortran 2018 does not allow this intrinsic procedure. [EOF]

 

but without standards it compiles ok so I have no clue what is going wrong.

0 Kudos
ferrad1
New Contributor I
521 Views

Must be some option.  Will try from a raw project and creep up on it.

0 Kudos
Steve_Lionel
Honored Contributor III
484 Views

It is an extension, not standard, so the standards warning is valid. Ron gave a pointer to the documentation.

Note that IS_IOSTAT_END that Andrew mention tests an IOSTAT value, you don't pass it a unit number.

0 Kudos
Reply