- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All
I am trying to read data from a file ..
REAL dq(3000,300)
INTEGER n,i
OPEN(11, FILE='C:dqnn.dat',STATUS='old')
cOPEN(13, FILE='C:dq.dat')
INTEGER n,i
OPEN(11, FILE='C:dqnn.dat',STATUS='old')
cOPEN(13, FILE='C:dq.dat')
nm=1962
im=200
DO n=1, nm
im=200
DO n=1, nm
DO i=1, im
READ(11,*)dq(n,i)
READ(11,*)dq(n,i)
cWRITE(13,*)dq(n,i)
ENDDO
ENDDO
ENDDO
END
No error msgs in the program, however when I run I will have this error message
forrtl: severe (59): list-directed I/O syntax error, unit 11, file C:dqnn.dat
Image PC Routine Line Source
dq.exe 00407799 Unknown Unknown Unknown
dq.exe 004075B1 Unknown Unknown Unknown
dq.exe 00406784 Unknown Unknown Unknown
dq.exe 00406BED Unknown Unknown Unknown
dq.exe 00404448 Unknown Unknown Unknown
dq.exe 00403E71 Unknown Unknown Unknown
dq.exe 00401179 Unknown Unknown Unknown
dq.exe 0042A709 Unknown Unknown Unknown
dq.exe 00421A94 Unknown Unknown Unknown
kernel32.dll 77E814C7 Unknown Unknown Unknown
Image PC Routine Line Source
dq.exe 00407799 Unknown Unknown Unknown
dq.exe 004075B1 Unknown Unknown Unknown
dq.exe 00406784 Unknown Unknown Unknown
dq.exe 00406BED Unknown Unknown Unknown
dq.exe 00404448 Unknown Unknown Unknown
dq.exe 00403E71 Unknown Unknown Unknown
dq.exe 00401179 Unknown Unknown Unknown
dq.exe 0042A709 Unknown Unknown Unknown
dq.exe 00421A94 Unknown Unknown Unknown
kernel32.dll 77E814C7 Unknown Unknown Unknown
Incrementally linked image--PC correlation disabled.
Press any key to continue
Press any key to continue
Any Idea about the error??
Thanks
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That means that the data in the file are invalid, and don't present valid real number-- perhaps there's a TAB instead of space, comma instead of dot...
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried to make the Dimension as q(i) only and I used a dat file that contains limited data sorted as
1
2
3
.
.
etc.
but it still give error..!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What are values of n and i when it crashes (you can set a temporary write(*,*) n,i to find out)?
Also, if you're sure that there are n*i lines, pay attention to the last line of the file -- if end-of-file is there, right after the number, read(*) will fail. Just add an empty line at the very end of tile.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The EOF at the end of the last line should be ok. That was a problem early on in DVF, but we fixed it long ago...

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