- #1
Axios
- 4
- 0
Hi,
I have been struggling with the Fortran IO for a while. Here is the question, any comments will be much appreciated.
I output some double precision numbers with the format:
write (file_id,'(6(ES17.10E3,2X))'), a,b,c,d,e,f ! say the filename is 'data.dat'
It works fine.
But when I open this file with the command
open (unit = file_id_2, file = "data.dat", status="old")
read (file_id_2,'(6(ES17.10E3,2X))'), a,b,c,d,e,f
I cannot read back what I previously write to the file correctly. Is there any obvious mistake that I made?
Any comments will be appreciated. Thanks!
I have been struggling with the Fortran IO for a while. Here is the question, any comments will be much appreciated.
I output some double precision numbers with the format:
write (file_id,'(6(ES17.10E3,2X))'), a,b,c,d,e,f ! say the filename is 'data.dat'
It works fine.
But when I open this file with the command
open (unit = file_id_2, file = "data.dat", status="old")
read (file_id_2,'(6(ES17.10E3,2X))'), a,b,c,d,e,f
I cannot read back what I previously write to the file correctly. Is there any obvious mistake that I made?
Any comments will be appreciated. Thanks!