- #1
gcc2012
- 3
- 0
Hi,
I am new to the forum, apologies if I break any rule posting a new thread. I could not find the answer in similar threads came up after searching the forum.
I want to read a formatted file of six column data. Reading works OK, but I want to put it into a do loop with the repeat as many as number of lines(rows) in the file and stops when reaching the end without complaining about the 'end of file'. I find in various sites that there is END parameter that can be used in READ, WRITE statements, e.g.,
READ (UNIT=15, FMT=2000, END=999)
and '999' at the end of file, but this does not work..
I am not so much into Fortran, so I do not understand the explanations of 'sequential', 'list directed', etc. exceptions to using END. And I do not know any other way of handling this.
Any help would be great!
gcc2012
I am new to the forum, apologies if I break any rule posting a new thread. I could not find the answer in similar threads came up after searching the forum.
I want to read a formatted file of six column data. Reading works OK, but I want to put it into a do loop with the repeat as many as number of lines(rows) in the file and stops when reaching the end without complaining about the 'end of file'. I find in various sites that there is END parameter that can be used in READ, WRITE statements, e.g.,
READ (UNIT=15, FMT=2000, END=999)
and '999' at the end of file, but this does not work..
I am not so much into Fortran, so I do not understand the explanations of 'sequential', 'list directed', etc. exceptions to using END. And I do not know any other way of handling this.
Any help would be great!
gcc2012