(j3.2006) Seeming problem with NAMELIST output of character variables
Thu Oct 9 01:48:56 EDT 2014
I got an interesting test case that exposed what seems to be an unfortunate consequence in the standard.
22.214.171.124 says that the default for the DELIM= specifier is ?NONE? in an OPEN statement.
10.10.4 says that list-directed output of character values when DELIM is ?NONE? does not include enclosing quotes.
10.11.4.2 says that namelist output editing is the same as for list-directed output. And NOTE 10.39 says that DELIM=?NONE? [which is the default] will output character values that cannot be read by a namelist read.
So, in the default case (no DELIM specified in OPEN) we have the situation that namelist output of character data cannot be read by a namelist input statement. Which is an unexpected situation for many users.
Did we really intend that this be the case?
At least one compiler (gfortran) ignores this combination of rules and includes the ? ? around character values in namelist output, which is what the user wanted/expected.
Bill Long longb at cray.com
Fortran Technical Suport & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
More information about the J3