To: J3 J3/21-166 From: Robert Corbett Subject: Edits for procedure pointers References: 21-007r1 Date: 2021-June-29 The definition of the term procedure pointer has been emended in Fortran 202x. The emendation missed one of the most important cases, namely, the definition of the term procedure pointer in Subclause 15.2.2.4 "Procedure pointers", [304:2]. An edit is provided. The text of Subclause 15.2.2.4 asserts that a procedure pointer may be pointer associated with "a dummy procedure that is not a procedure pointer". A procedure pointer cannot be pointer associated with a dummy procedure. Subclause 10.2.2.4 "Procedure pointer assignment" p1, [176:32-33] states that when the pointer target is a dummy procedure that is not a procedure pointer, the pointer object becomes pointer associated with the ultimate argument of the dummy procedure. The ultimate argument of a dummy procedure cannot be a dummy procedure. An edit is provided. Subclause 15.2.2.4, [304:2] uses the word "may". The word "can" would be better in this case. An edit is provided. The two parts of the sentence in Subclause 15.2.2.4 would be better split into two sentences. An edit is provided. The intrinsic function ASSOCIATED does not handle the case where the TARGET argument is a dummy procedure. If the dummy procedure is a procedure pointer other than a dummy procedure pointer, ASSOCIATED should use the ultimate argument of TARGET, not TARGET itself. A strict reading of the current text is that the result of invoking ASSOCIATED with a TARGET that is a dummy procedure other than a dummy procedure pointer must return false, which is obviously not intended. Edits are supplied. EDITS to 21-007r1 [304:2] 15.2.2.4 Procedure pointers Replace "the EXTERNAL and POINTER attributes" with "the POINTER attribute". [304:2] 15.2.2.4 Procedure pointers Replace "; it" with ". A procedure pointer". [304:2] 15.2.2.4 Procedure pointers" Replace "may with "can". [304:3-4] 15.2.2.4 Procedure pointers Replace "an external procedure, an internal procedure, an intrinsic procedure, a module procedure, or a dummy procedure that is not a procedure pointer." with "an external, internal, intrinsic, or module procedure" {The resulting Subclause is 15.2.2.4 Procedure pointers A procedure pointer is a procedure that has the POINTER attribute. A procedure pointer can be pointer associated with an external, internal, intrinsic, or module procedure.} [361:13] 16.9.20 ASSOCIATED After "a procedure" insert "other than a dummy procedure or a procedure pointer". [361:14+] 16.9.20 ASSOCIATED After Case (ii) insert "Case (iia): If TARGET is present and is a dummy procedure that is not a procedure pointer, the result is true if and only if POINTER is associated with the procedure that is the ultimate argument of TARGET and, if the procedure is an internal procedure, they have the same host instance."