J3/01-302 Date: 6 August 2001 To: J3 From: WG5 Members Subject: Interp 91 (Definition of "present" is defective) WG5 members in London considered Interp 91 and recommend as follows. The HISTORY mentions the action recommended by WG5. ---------------------------------------------------------------------- NUMBER: 000091 TITLE: Definition of "present" is defective KEYWORDS: present, dummy argument DEFECT TYPE: Erratum STATUS: J3 consideration in process QUESTION: Subclause 12.4.1.5 begins with a definition of the term "present": "A dummy argument is present in an instance of a subprogram if it is associated with an actual argument and the actual argument either is a dummy argument that is present in the invoking subprogram or is not a dummy argument of the invoking subprogram." This seems to be defective in that if the actual argument is a dummy argument that is accessed by host association, it is not a dummy argument OF the invoking subprogram, and therefore although it may be "not present" in the procedure of which it is a dummy argument, it is nonetheless "present" in an internal procedure of that procedure. Consider: module M contains subroutine S1 ( A ) integer, optional :: A call S11 contains subroutine S11 call S12 ( A ) end subroutine S11 subroutine S12 ( B ) integer, optional :: B if ( present(B) ) print *, 'B is present' end subroutine S12 end subroutine S1 end module M program P use M, only: S1 call S1 end program P Should this print "B is present" as implied by the above analysis? ANSWER: No, the program should not print anything. DISCUSSION: The lack of consideration of host association in the cited text is accidental; an edit is supplied to correct this oversight. EDITS: [202:43-45] Replace the first sentence of 12.4.1.5 by "A dummy argument or an entity that is host associated with a dummy argument is not <> if the dummy argument (1) is not associated with an actual argument, or (2) is associated with an actual argument that is not present. Otherwise, it is present." [299:4-6] Delete the glossary entry for <> SUBMITTED BY: Van Snyder HISTORY: 01-134 m156 Submitted 01-134r1 m156 Passed unanimously by J3 meeting 01-224r1 m157 Passed by J3 letter ballot WG5-N1395 Failed WG5 letter ballot WG5-N1463 Accept Kurt Hirchert's suggestion with minor edits