To: J3 J3/19-136 From: Daniel Chen Subject: F2018 interp: In array element order execution should apply to IMPURE elemental function only Date: 2019-February-11 1. Introduction In F2003, the standard says (12.7.2), "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 any order, to corresponding elements of each array actual argument." In F2008, we added the following in the Introduction section[xvi] "An impure elemental procedure processes array arguments in array element order." However, we changed p1 of 12.8.2 Elemental function actual arguments and results from "in any order" to "in array element order" without saying this should apply to IMPURE elemental function only. In F2018, we kept the same wording as F2008 (15.8.2) 2. Interpretation Request ---------------------------------------------------------------------- NUMBER: F18/xxxx TITLE: PURE Elemental function should be executed in any order. KEYWORDS: ELEMENTAL, PURE DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: If the argument of an pure elemental function is an array, should the result be the same as it would have been obtained if the scalar function had been applied, in any order, to corresponding elements of each array actual argument. ANSWER: Yes. This is an oversight. EDITS to 18-007r1: [326: 22] In 15.8.2 Elemental function actual arguments and results Change "in array element order" to "in array element order if it has the PURE prefix or in any order otherwise" It makes the whole sentence read, "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 it has the PURE prefix or in any order otherwise, to corresponding elements of each array actual argument." SUBMITTED BY: Daniel HISTORY: 19-xxx m218 submitted ----------------------------------------------------------------------