J3/10-149 To: J3 Subject: Interpretation concerning the TARGET argument of ASSOCIATED From: Van Snyder Date: 2010 April 01 ------------------------------------------------------------------------ NUMBER: F08/xxxx TITLE: Is the TARGET argument of ASSOCIATED a pointer or nonpointer dummy KEYWORDS: TARGET argument of ASSOCIATED DEFECT TYPE: Erratum STATUS: Under consideration QUESTION: Is the following conforming, and if so what does it print? program TARGET_Arg integer, pointer :: Pointer integer, pointer :: Target => NULL() integer, target :: AnotherTarget pointer => anotherTarget print *, Associated(pointer,target) end program TARGET_Arg DISCUSSION: Subclause 13.7 stipulates that descriptions of arguments of intrinsic arguments apply to actual arguments. This leaves open the question whether the TARGET dummy argument of ASSOCIATED is a pointer or not. If not a pointer, being optional, it is considered by subclause 12.5.2.12 to be absent if the corresponding actual argument is disassociated. Thereby, the result value of ASSOCIATED (by Case(i) of the result value clause) is true. If the TARGET dummy argument is a pointer, the result value of ASSOCIATED (by Case (iv) of the result value clause) is false. ANSWER: It is intended that the program in the question is conforming and prints F. Edits are provided to clarify this. EDITS: Change the description of the interface to state explicitly that the TARGET dummy argument has the POINTER and INTENT(IN) attributes. A nonpointer actual argument is now permitted by 12.5.2.7p2 to correspond to an INTENT(IN) pointer dummy argument, whereupon the dummy argument becomes pointer associated with the actual argument. The result is that a disassociated TARGET actual argument cannot be considered to be absent. [13.7.1p2] Before the third sentence, the one beginning "The result characteristics...," insert a sentence "Where explicitly stated, additional specifications apply to the dummy arguments." [13.7.16p3] At the end of the description of the TARGET argument, add the sentence "The dummy argument TARGET has the POINTER and INTENT(IN) attributes." ALTERNATIVE EDITS: Change the subclause title for 13.7.16 from "ASSOCIATED ( POINTER [, TARGET ] )" to "ASSOCIATED ( POINTER ) or ASSOCIATED ( POINTER, TARGET )" [13.7.16p3] Remove "(optional)" from the description of the TARGET dummy argument. [13.7.16p5(i)] Replace "is absent" by "does not appear". [13.7.16p5(ii-vii)] Replace "is present" by "appears" six times. SUBMITTED BY: Van Snyder HISTORY: ------------------------------------------------------------------------