David Vowles writes:
> WRITE(fout) x
...
> My question is, having written x as above, is it standard conforming to read x
> in component order as follows:
>
> READ(fin) x%component1,x%component2
No, it isn't standard-conforming. Might happen to work. Might not.
Might depend on the details of the derived type.
Section 9.4.2 of the f90 standard
....
An input/output list item of derived type in an unformatted
input/output statement is treated as a single value in a
processor-dependent form. Note that, in this case, the appearance
of a derived type object is *NOT* [emphasis mine] equivalent to
the list of its components.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|