(j3.2006) Namelist output
Thu Jan 15 05:36:18 EST 2009
Lawrie Schonfelder wrote:
> Are you
>> saying that for
>> type t
>> real x
>> real y
>> end type
>> type(t) :: z
>> if the namelist object is z then it is legal in an input data record to
>> ... z%x = 1.0, z%y = 2.0 ...
>> instead of z followed by two real constants? I don't see where that is
>> allowed in the standard.
> I can see no reason why it should be forbidden. I have very little brief for NAMELIST as such but I
> would have thought that one of its benefits was that it allowed a piece of an object to be changed
> without having to reinput the whole. Z%x seems to me to be a perfectly obvious thing one might want
> to change leaving Z%y unchanged, which is how I though NAMELIST was supposed to work.
The standard is clear enough on namelist input. In f2003, see 10.10.1.1
(243:24-27). Note that this sentence uses 'name' for 'name or designator'.
My concern is about output, not input. 10.10.2.2 (247:27-28) says "The name of
each namelist group object list item is placed in the output record followed by
an equals and a list of values of the namelist group object list item.". I think
'name' here was probably meant in the same loose way as in 10.10.1.1. If not,
then the first sentence of 10.10.2, which says "The form of the output produced
is the same as that required for input, except for the forms of real, character,
and logical values." is wrong.
The effect of this interpretation is that vendors are given the choice of using
either form. That seems to be what is happening in the marketplace.
Are we all agreed on this, or should I submit a formal interp request?
More information about the J3