09-267 To: J3 From: Malcolm Cohen Subject: Interpretation request Date: 2009 July 27 1. Introduction This paper contains an interpretation request to handle the situation mentioned in 09-261. Although 09-261 contains a fix for this, that interpretation request is actually on a different topic thus the separate request. The edit contained in the proposed answer to this request makes a slightly stricter requirement than that of the edit in 09-261. 2. Interpretation Request ---------------------------------------------------------------------- NUMBER: F03/? TITLE: Dummy procedure type compatibility KEYWORDS: Dummy function, implicit interface DEFECT TYPE: Interpretation STATUS: J3 consideration in progress QUESTION: Consider PROGRAM EXAMPLE REAL,EXTERNAL :: F CALL S(F) END SUBROUTINE S(A) INTEGER,EXTERNAL :: A PRINT *,A() END SUBROUTINE REAL FUNCTION F() F = HUGE(0.0) END FUNCTION Subclause 12.4.1.3 (pages 271-272) appear to require that the actual argument corresponding to a procedure dummy argument must be a function if the dummy procedure is referenced as a function, but there seems to be no visible requirement for it to have the same type and type parameters. That would seem to make the above program standard conforming. Is there intended to be such a requirement? ANSWER: Yes, there should be such a requirement. An edit is supplied to correct this oversight. EDIT: [271:28] Append new sentences to the end of paragraph 5 of 12.4.1.3 "If both the actual argument and dummy argument are known to be functions, they shall have the same type and type parameters. If only the dummy argument is known to be a function, the function that would be invoked by a reference to the dummy argument shall have the same type and type parameters, \obs{except that an external function with assumed character length may be associated with a dummy argument with explicit character length}". {The second sentence is there to catch an argument association chain, and this case needs to allow the obsolescent assumed-length character function. In the case in the first sentence, the actual argument already is prevented from having assumed length by our other rules.} SUBMITTED BY: Malcolm Cohen HISTORY: 09-267 m189 Submitted ----------------------------------------------------------------------