To: J3 Members J3/16-251 From: Van Snyder Subject: Comments on implicit interface References: 16-007r2 Date: 2016 September 28 1. Introduction There is no complete definition an implicit interface. It consists of "not an explicit interface." The definition in 3.89 is only an incompete list of two of the three properties of an incomplete interface for functions (it doesn't include its name, which is part of the interface according to 15.4.1), and does not mention implicit interface for subroutines. 2. Edits [15:9 3.89] An implicit interface includes the name of a procedure, and does not include type and type parameters if it is an interface of a subroutine. Replace the definition with "interface of a procedure that includes no more than its name [if it is not known to be a function], or no more than its name, type, and type parameters if it is known to be a function [where its name appears] (15.4.3.9) \ref{D15:Implicit interface specification}" [301:17 15.4.2.1] After first "implicit" insert "(15.4.3.9) \ref{D15:Implicit interface specification}". [312:8+ 15.4.3.9] Insert paragraphs "If the interface of a procedure is not explicit it is implicit (15.4.2) \ref{D15:Implicit and explicit interfaces}. "Within a scoping unit, a name is known to be the name of a function if it has explicit interface (15.4.2.1) \ref{D15:Interfaces and scopes}, if it is referenced as a function, or if it has the EXTERNAL attribute (8.5.9) \ref{D8:EXTERNAL attribute} and its type and type parameters are explicitly or implicitly declared. A name is known to be the name of a subroutine if it has explicit interface or if it is referenced in a CALL statement. "Within a scoping unit, the implicit interface of a name that has the EXTERNAL attribute and is not known to be a function name consists only of its name." [312:9 15.4.3.9] Replace the first sentence, viz. "If ... , the ... function name" with "Within a scoping unit, the implicit interface of a name known to be a function name consists only of its name, type, and type parameters." [312:10 15.4.3.9] Start a new paragraph with the second sentence, which begins "The type, type parameters, and shape of the dummy arguments...." [312:12+ 15.4.3.9] Insert a note: "NOTE 15.18a Within a scoping unit, a function can have an implicit interface that consists only of its name, or a procedure can have an implicit interface where it is not known whether it is a subroutine or a function, if its name has the EXTERNAL attribute and the only use of its name is as an actual argument or as the in a pointer assignment statement (10.2.2) \ref{D15:Pointer assignment}."