ISO/IEC JTC1/SC22/WG5 N1463 SECOND REPORT OF THE INTERPRETATIONS SUBGROUP NUMBER: 000091 TITLE: Definition of "present" is defective KEYWORDS: present, dummy argument DEFECT TYPE: Erratum STATUS: Passed by J3 letter ballot 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 Accepted Kurt Hirchert's suggestion with minor edits ---------------------------------------------------------------------- NUMBER: JP-05 TITLE: Construction of array values KEYWORDS: DEFECT TYPE: STATUS: J3 consideration in progress QUESTION: JP-5) 4.5 Construction of array values, "The ac-do-variable of an ac-implied-do that is in another ac-implied-do shall not appear as the ac-do-variable of the containing ac-implied-do." This sentence should be a Constraint. ANSWER: No. The requirement should be made a constraint in the next standard. It should remain a simple requirement in Fortran 95. EDIT: None SUBMITTED BY: Japan HISTORY: 99-208 Submitted 99-221 Classed as Fortran 95 Interpretation. WG5-N1411 Draft answer 00-260 m154 Passed by J3 meeting 00-329 m155 Failed J3 letter ballot WG5-N1463 Accepted Henry's and Jon's comments ------------------------------------------------------------------------- NUMBER: JP-31 TITLE: Signs of literal constants KEYWORDS: DEFECT TYPE: STATUS: J3 consideration in progress QUESTION: JP-31) The fourth sentence of 10.8 and sixth sentence of 10.9: "Each value is either a null value or one of the forms: c r*c r* where c is a literal constant or a nondelimited character constant and r is an unsigned, nonzero, integer literal constant." "a literal constant" should be "an optionally signed literal constant" ANSWER: Add the phrase, "if integer or real" to that last phrase above. EDIT: [175:5] Replace "constant or" by "constant, optionally signed if integer or real, or" [178:40] Replace "constant and" by "constant, optionally signed if integer or real, and" Note for F2000: The phrase "literal constant" [73:34] in F95 is not the BNF term but F95 doesn't say if "literal constant" is signed. SUBMITTED BY: Japan HISTORY: 99-208 Submitted 99-221 Classed as Fortran 95 Interpretation. WG5-N1411 Draft answer 00-260 m154 Passed by J3 meeting 00-329 m155 Failed J3 letter ballot WG5-N1463 Update to edit