(j3.2006) SOURCE= questions
Bill Long
longb
Mon Feb 2 19:04:47 EST 2009
Is the statement
allocate (X, source=Y)
a mechanism that can cause X to become defined? It would seem so, yet
I don't see anything about this in 16.6.5 "Events that cause variables
to become defined". Is this an oversight (same question for f03)? If Y
is defined, then X becomes defined.
Similarly, an allocate statement without a SOURCE= spec would seem to
cause the allocated variable to become undefined. But we don't mention
that in 16.6.6 "Events that cause variables to become undefined". If
SOURCE= does appear as above, and Y is undefined, then does X become
undefined?
We also say that if MOLD = Z appeared instead, then Z does not have to
be defined [129:27]. There is no corresponding statement for SOURCE=.
Do we require that Y be defined? It seems not. If it is a pointer, it
has to be associated, and if it is allocatable it has to be allocated
[129:18]. But that's not a requirement that it be defined.
Finally, in f03 we require that bounds appear on X even if there is a
SOURCE= spec. In f08 we deleted that requirement, since the bounds are
available from Y. Was there a reason for the f03 requirement?
Cheers,
Bill
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3
mailing list