Print

Print


I reject your unnecessary change.

The fact that the order does not matter is sufficient.

Cheers,
-- 
..............Malcolm Cohen, NAG Oxford/Tokyo.

-----Original Message-----
From: Fortran 90 List [mailto:[log in to unmask]] On Behalf Of Vipul Parekh
Sent: Wednesday, August 23, 2017 2:06 PM
To: [log in to unmask]
Subject: Re: [COMP-FORTRAN-90] elemental procedures - array element order?

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