On Tue, Aug 22, 2017 at 8:53 PM, Malcolm Cohen <[log in to unmask]> wrote:
> ..
> So there is no change to the semantics for PURE ELEMENTAL, the change is to
> support IMPURE ELEMENTAL.
> ..
The verbiage in the standard since 10-007r1
(http://j3-fortran.org/doc/year/10/10-007r1.pdf) including N2137, the
committee draft toward Fortran 2015, does not make clear there is no
change to the semantics for PURE ELEMENTAL.
Take the section in the standard on "Elemental function actual
arguments and results": I think the last sentence if it read:
--- suggested rewording ---
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 if the function has
prefix-spec IMPURE or in any order otherwise, to corresponding
elements of each array actual argument.
--- end ---
would better inform the readers the semantics change applies to IMPURE
ELEMENTAL. That is, the introduction of the phrase "if the function
has prefix-spec IMPURE or in any order otherwise" or something to that
effect will spike it out for the readers.
The same would apply to the following section in the standard on
"Elemental subroutine actual arguments"
Vipul Parekh
|