09-174 To: J3 From: Van Snyder Subject: Shape of result of elemental function as defined operation Date: 2009 March 27 References: 09-007r1 1. Discussion 12.8.2p1 [316:13-14] says "If a generic name or a specific name is used to reference an elemental function, the shape of the result is the same as the shape of the actual argument with greatest rank." There's nothing subsequent in that paragraph about the case of an elemental function invoked by way of an operator. We could almost say "The shape of the result of a reference to an elemental function is the same as the shape of the actual argument with greatest rank." The problem is that we don't call the operands of a defined operation actual arguments. 12.4.3.4.3p2 [287:1-3] does, however, specify that the left-hand side and the right-hand side of defined assignment are actual arguments. It would be better if we did the same for defined operations, mutatis mutandis. The last sentence of 12.5.2.4p13 [296:29-31] treats operands of defined operations as if they were actual arguments, so we probably need to specify that operands of defined operations ARE actual arguments. The first sentence of 12.8.3p1 [317:2] appears not to contribute anything. 2. Edits [286:11-13 12.4.3.4.2p2]------------------------------------------------ Editor: Replace the second sentence of 12.4.3.4.2p2 ("For a unary ... second dummy argument") by the following: "A unary defined operation is treated as a reference to the function, with its operand as the actual argument; a reference to a binary defined operation is treated as a reference to the function, with its left-hand operand as its first actual argument and its right-hand operand as its second actual argument." [316:13-14 12.8.2p1]---------------------------------------------------- Editor: Replace the first sentence of 12.8.2p1 ("If a generic ... rank") by the following: "The shape of the result of a reference to an elemental function is the same as the shape of the actual argument with greatest rank." [317:2 12.8.3p1]-------------------------------------------------------- Editor: Delete the first sentence of 12.8.3p1 ("An elemental ... arguments.").