- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am new to Fortran. I have a *.asc file that I am trying to open and read data from.
I tried the normal open command:
INTEGER :: ierror
INTEGER :: status
OPEN (UNIT=10,FILE=s1989.asc,STATUS= 'OLD', ACTION = 'READ', IOSTAT = ierror)
READ (UNIT=10,*,IOSTAT=status) i x
But the Intel compiler won't comple the program.
error #6456: This name must be a RECORD name. [S1989]
error #6460: This is not a field name that is defined in the encompassing structure. [ASC]
Any help would be greatly appreciated.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - msm26
OPEN (UNIT=10,FILE=s1989.asc,STATUS= 'OLD', ACTION = 'READ', IOSTAT = ierror)
Hi,
FILE takes a character expression, so you're missing ' (quotes).
Change it to: FILE='s1989.asc'
A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for your help. That did it.
All the best,
Sean
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