N2134, 15.8.2 Elemental function actual arguments and results,
p1 last sentence, [339:5] says:
"in the array case, the values of the elements, if any, of
the result are the same as would have been obtained if the scalar
function had been applied separately, in array element order,..."
Why should array element order matter?
Note 15.50, which follows the above sentence, shows
an example of an elemental reference to the
intrinsic function MAX. I think in this example
the order in which the scalar MAX is applied to
elements to the arrays does not matter.
Are there some cases where the order does indeed matter?
Also, the following clause,
15.8.3 Elemental subroutine actual arguments
has a very similar sentence but adds intent.
Why the dummy argument intent matters for
elemental subroutines but not for elemental
functions?
Anton
|