J3/06-143 Date: 16 February 2006 To: J3 From: Van Snyder Subject: Edits for impure elementals Number: UK-011 References: N1649, J3/05-238 Detailed Specification: Introduce a new keyword, IMPURE, which is the opposite of PURE. An ELEMENTAL procedure remains PURE by default but may be declared IMPURE. Such a procedure must still satisfy the "elemental" requirements but need not satisfy the "pure" requirements. As before, a non-ELEMENTAL procedure is IMPURE by default but may be declared PURE. For consistency, since an ELEMENTAL procedure may redundantly be declared PURE, allow a non-ELEMENTAL procedure to be redundantly declared IMPURE. Edits to J3/04-007: [18:16-17] In the final two lines of the third paragraph of 2.4.5, delete ", and all such element operations may be performed in any order or simultaneously". Insert a Note after the paragraph: NOTE 2.4a If an elemental operation is intrinsically pure or is implemented by a pure elemental function (12.7), the element operations may be performed simultaneously or in any order. [129:2] In the line before NOTE 7.13, delete "The processor may perform the element-by-element operations in any order." [129:4] In the sentence after NOTE 7.13, delete ", in any order,". Insert a note after the paragraph: NOTE 7.13a If an elemental operation is intrinsically pure or is implemented by a pure elemental function (12.7), the element operations may be performed simultaneously or in any order. [142:28] In the first sentence of the second paragraph of 7.4.1.5, delete ", in any order,". [143:1-] At the end of Note 7.42, add a sentence: "If elemental assignment is defined by a pure elemental subroutine, the element assignments may be performed simultaneously or in any order." [280:2+] Add to R1228, after "<> PURE": <> IMPURE [280:5+] Add constraint on R1227: C1241a (R1227) A prefix shall not specify both PURE and IMPURE. [281:1] In the line after NOTE 12.37, after "ELEMENTAL appears" add "and IMPURE does not appear". [281:3-4, 282:28-29] Replace the paragraph before NOTE 12.37 and the last paragraph of 12.5.2.2 by "If the ELEMENTAL appears, the subprogram is an elemental subprogram. If the ELEMENTAL appears and IMPURE does not appear, the subprogram is a pure elemental subprogram and shall meet the additional constraints of 12.7.1." [282:26] In the penultimate paragraph of 12.5.2.2, after "ELEMENTAL appears" add "and IMPURE does not appear". [284:18,19] In the penultimate paragraph of 12.5.2.4, replace "keyword PURE is" by "keywords PURE and IMPURE are". After "ELEMENTAL is specified" add "and IMPURE is not specified". [286:9] In the second paragraph of 12.6, after "ELEMENTAL" add "and does not have the IMPURE". [287:13] In the second paragraph of 12.7.1, replace the second line by "program unless it has the IMPURE. The". [287:14] In the final line of the second paragraph of 12.7.1, before "elemental" add "pure". [287:15] In C1277 change "an elemental" to "a pure elemental". [287:17] In C1278 change "an elemental" to "a pure elemental". [288:2] In C1279 change "an elemental" to "a pure elemental". [288:11] In the line before NOTE 12.48, replace "in any order" by "in array element order". [289:8-9] In the last two lines of the first paragraph of 12.7.3, replace "in any order" by "in array element order".