file io - Non-advancing read in Fortran with free format -
i want read line in file, includes 3 real numbers, without advancing pointer. wrote: (txt variable representing file has value of 80)
read(txt, *, advance='no') (numbers(i),i=1,3)
however, got error message saying:
"error #6568: utilize of advance, size, or eor specifier invalid."
so how should write create correct?
thanks.
you can utilize advance='no' explicit format. reason next : advance='no' avoids go next record (notice file pointer advances anyway, after lastly read value); directed list (format *), 1 doesn't know how many record involved read statement (the 3 numbers may written on 4 lines instance).
file-io fortran fortran90 fortran77
No comments:
Post a Comment