- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was evaluating Intel Fortran when I noticed a possible bug. Code to duplicate the issue is as follows:
CHARACTER MyChar
OPEN(10,FILE='MyFile',STATUS='OLD',ERR=300)
DO I=1,150
READ(10,*,ERR=300,END=300) MyChar
ENDDO
300 CONTINUE
where my file would be of the form:
'1'
'2'
'3'
'4
Now the '4 is missing the trailing quote. The behavior I would expect, and have recieved from WATCOM and other compilers, is that the invalid '4 would cause the ERR=300 to be executed and jump to the 300 CONTINUE, but instead it just locks up.
Any thoughts?
Thanks,
Bryan
CHARACTER MyChar
OPEN(10,FILE='MyFile',STATUS='OLD',ERR=300)
DO I=1,150
READ(10,*,ERR=300,END=300) MyChar
ENDDO
300 CONTINUE
where my file would be of the form:
'1'
'2'
'3'
'4
Now the '4 is missing the trailing quote. The behavior I would expect, and have recieved from WATCOM and other compilers, is that the invalid '4 would cause the ERR=300 to be executed and jump to the 300 CONTINUE, but instead it just locks up.
Any thoughts?
Thanks,
Bryan
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bug. I'll report it.
I would expect the END= branch to be taken rather than ERR= but for your program it doesn't matter. Sorry for the inconvenience.
I would expect the END= branch to be taken rather than ERR= but for your program it doesn't matter. Sorry for the inconvenience.

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