I am writing a Fortran application, and I get this problem. When I define a namelist as following:
CHARACTER(100) :: INPUT_DIR, OUTPUT_DIR, ROOT_DIR
NAMELIST /IODIR/ INPUT_DIR, OUTPUT_DIR
and then I read IODIR
from file as:
READ(FUNIT,IODIR, ERR=99)
The data in file is:
&IODIR INPUT_DIR="Input", OUTPUT_DIR="Output" /
But it get error
"End of file".
It seems like the length of variables is longer than their defined in file. I don't know how to set delimiter for the character variable, or read an unknown character in namelist. I use GNU Fortran
to build.