- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am getting a list direct I/O syntax error. Everything compiled and created an execuatable.
Does eveything look legal in the file. It is usung an adjustable array in the read.
Thanks, Here is the file.
I am getting a list direct I/O syntax error. Everything compiled and created an execuatable.
Does eveything look legal in the file. It is usung an adjustable array in the read.
Thanks, Here is the file.
program read_data USE ReadConfigFile Implicit Double Precision ( A-H, O-Z), Integer (I-N) Character*80 filepath(3),file1, file2, file3 Double precision, Allocatable :: xread1(:),xread2(:),xread3(:) Dimension nvars_in_file(3) call gtconfig(nvars_in_file, filepath) lin2 = 2 lin3 = 3 lin4 = 4 ! default sequential, formatted open(unit=lin2,file=trim(filepath(1)),status='old',mode='read',share='denynone') open(unit=lin3,file=filepath(2),status='old',FORM='formatted') open(unit=lin4,file=filepath(3),status='old',FORM='formatted') nv1 = nvars_in_file(1) nv2 = nvars_in_file(2) nv3 = nvars_in_file(3) ALLOCATE(xread1(nv1),xread2(nv2),xread3(nv3)) Read(lin2,*) (xread1(i), i=1,nv1) Read(lin3,*) (xread2(i), i=1,nv2) Read(lin4,*) (xread3(i), i=1,nv3) end program Read_data
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't you need TRIM fr the second and the third OPEN too? Couldn't the PATH be longer than 80 characters?
Sabalan.
Sabalan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The TRIM isn't necessary in this case. Trailing blanks in filespecs are ignored. If it was a problem with the OPEN, the error from the READ would be different.
Without seeing the data file, it's difficult to analyze the problem. You should be able to figure out which line (or lines) are being read to help narrow it down.
Steve
Without seeing the data file, it's difficult to analyze the problem. You should be able to figure out which line (or lines) are being read to help narrow it down.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the replies.
After reading them I was able to focus more on the file and found that the first field had a time stamp. It bombed on the read of the time.
Such as 12:01:01
The other fields had floating point or integers.
Any suggestions on handling the time? I do need the parameter for later processing.
Thanks
After reading them I was able to focus more on the file and found that the first field had a time stamp. It bombed on the read of the time.
Such as 12:01:01
The other fields had floating point or integers.
Any suggestions on handling the time? I do need the parameter for later processing.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read it as a string with an (A) format.
Steve
Steve

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