- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Done in 15.0, though the diagnostic incorrectly mentions F90. I'll have that fixed.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page