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

Advance = YES with EOR gives no warning/error

abhimodak
New Contributor I
437 Views
I think the snippet below should give at least a warning when compiled with standard warning is enabled since EOR cannot be specified for Advance == YES.

I am using 11.1.038 on WinXP64 with VS2005.

The command line for compilation is:

/nologo /debug:full /Od /gen-interfaces /stand:f03 /warn:all /module:"Debug\" /object:"Debug\" /traceback /check:bounds /libs:static /threads /dbglibs /c

Abhi

----

Program Test_NoAdvance

!
! Purpose: Test Advance = NO
!

Implicit None

Integer, Parameter :: N = 5
Real :: A(N), B
Integer :: i

Open(90, File='Input.dat', Form='Formatted', Status='Old')

Rewind(90)

Read(90,"(5(F4.1,1X))",ADVANCE='YES',ERR=990,END=991,EOR=992) (A(i), i=1,N)
Read(90,*,ERR=995,END=996) B

Close(90)

990 Stop "ERR."
991 Stop "END."
992 Stop "EOR."

995 Stop "ERR2."
996 Stop "END2."

End Program Test_NoAdvance
0 Kudos
1 Solution
Steven_L_Intel1
Employee
437 Views
The standard does not require such a diagnostic, but I agree it would be nice where the values are literals. I'll pass this on to the developers.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
438 Views
The standard does not require such a diagnostic, but I agree it would be nice where the values are literals. I'll pass this on to the developers.
0 Kudos
Steven_L_Intel1
Employee
437 Views

Done in 15.0, though the diagnostic incorrectly mentions F90. I'll have that fixed.

0 Kudos
Reply