To: J3 J3/18-251r1 From: Jon Steidel Subject: Are internal procedures allowed in generic interface blocks Date: 2018-October-16 ---------------------------------------------------------------------- NUMBER: F18/0002 TITLE: Internal procedures in generic interface blocks KEYWORDS: Internal procedure, generics interface block DEFECT TYPE: Erratum STATUS: New QUESTION: An internal procedure is allowed in a GENERIC statement, but apparently it cannot appear in a generic interface block. Section 15.4.3.4.1 (12.4.3.4.1 in F2008) Generic identifiers p1 states "A generic interface block specifies a generic interface for each of the procedures in the interface block. The PROCEDURE statement lists procedure pointers, external procedures, dummy procedures, or module procedures that have this generic interface." Is the apparent prohibition of internal procedures in the PROCEDURE statement intended? ANSWER: No, this was not intended. An internal procedure should be allowed in a generic interface body. An edit are provided to correct this mistake. DISCUSSION: In F2003, Section 12.3.2.1 Interface Block has rule R1206 is [MODULE] PROCEDURE with constraint C1270 "A shall have an exlicit interface and shall refer to an accessible procedure pointer, external procedure, dummy-procedure, or module procedure." Edits in paper 05-202r1 allowed internal procedures to be passed as actual arguments and to be targets of procedure pointers. This meant an internal procedure could be the target of a procedure pointer which was specified in a generic interface body. Paper 08-178 asked the question "What is the point of excluding internal procedure in C1207?" and replaced C1207 with "A shall be a nonintrinsic procedure that has an explicit interface." The normative text cited in the question was not modified. This was an oversight. EDITS to 18-007r1: [294:11-12] 15.4.3.4.1 Generic identifiers, p1, second sentence, Change "procedure pointers, external procedures, dummy procedures, or module procedures" to "nonintrinsic procedures with explicit interfaces". This makes the sentence read: "The PROCEDURE statement lists nonintrinsic procedures with explicit interfaces that have this generic interface." SUBMITTED BY: Jon Steidel HISTORY: 18-251 m217 Submitted 18-251r1 m217 Revised ----------------------------------------------------------------------