I sent a little program with several references to MERGE, and asked if
your compiler worked like mine.
James Giles quoted the standard to justify that it ought to work as
it does.
The point that I should have made clear in the original posting is that
the standard appears to have "dueling specifications".
MERGE is classified as an elemental function, but the specification
for the result characteristics are "same as TSOURCE". Subclause
12.2.1.1 says the characteristics of a dummy data object are its
"type, type parameters (if any), its shape...."
There is perhaps some more confusion because it's not clear whether
subclause 13.14 describes the dummy arguments or the actual arguments
of intrinsic procedures. All it says (in the second paragraph of
13.14.0) is "The types and type parameters of intrinsic procedure
arguments ... are determined by these specifications."
So, is the shape of the result of MERGE the same as the shape of its
TSOURCE argument, as explicitly stated in 13.14.68, or does the
description of elementality (12.7) take precedence?
I think it's the latter, in which case only the type and type parameters
of the result are the same as those of the TSOURCE argument. That
characteristics of a dummy argument include intent, whether it is a
pointer, whether it is a target... lend weight to this argument. The
result clearly doesn't have intent, and elemental procedures are prohibited
from having pointer dummy arguments.
--
What fraction of Americans believe | Van Snyder
Wrestling is real and NASA is fake? | [log in to unmask]
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Dan Goldin, George Bush, the Pope, or anybody else.
|