J3/06-306r4 Date: 17 November 2006 Subject: Comments on Clause 12 From: John Wallin and Aleksandar Donev Discussion 296:9-10 Overlooks internal procedures. 312:3-4 Conflicts with 12.5.2.3: 12.5.2.3 says "if a nonoptional nonpointer dummy argument corresponds to a pointer actual argument, the actual argument shall be pointer associated with a target and the dummy argument becomes argument associated with that target" and "A present nonpointer dummy argument that corresponds to a nonpointer actual argument becomes argument associated with that actual argument." [312:3-4] says "If the dummy argument has the VALUE attribute it becomes associated with a definable anonymous data object. . . ." No matter whether the actual argument has the pointer attribute, 12.5.2.3 conflicts with [312:3-4]. Question: [318:5-10] We allow automatic "pointering" of INTENT(IN) pointer dummy variables to nonpointer actual arguments and automatic dereferencing of nonpointer dummy variables associated with pointer actual arguments. It appears we don't allow the same for procedure pointer arguments. Did we intend this asymmetry? Answer: No, we did not intend this asymmetry. Edits are provided to correct this oversight. Edits ---------------------- [296:9] Change "an external procedure, module" to "an external procedure, internal procedure, module". [311:2], [311:4] and [311:6] Insert "that does not have the VALUE attribute" after "dummy argument". Note to Editor: The paragraph at [311:2-7] is unreadable, especially with the above edit. Subgroup tried to reword this but did not have time to finish. Here is our best attempt if the editor wishes to consider it: "In references to procedures, other than intrinsic inquiry functions, where the dummy argument does not have the POINTER or VALUE attributes, if the actual argument is a pointer and the dummy is nonoptional, the pointer shall be associated with a target. If the actual argument is a pointer associated with a target, the dummy argument becomes argument associated with that target. Otherwise, if the corresponding actual argument is not a pointer, the dummy argument becomes associated with that actual argument." [311:10+] Insert a new paragraph: "If a present dummy argument has the VALUE attribute it becomes argument associated with a definable anonymous data object. If the dummy argument corresponds to a nonpointer actual argument the initial value of the data object is the value of the actual argument. If the dummy argument corresponds to a pointer actual argument that pointer shall be pointer associated with a target and the initial value of the data object is the value of that target." Delete [312:3-5] and add a new sentence in Note 12.23 before the last sentence "The actual mechanism...": "Subsequent changes to the value or definition status of the dummy argument do not affect the actual argument." [315:31] Change "assignment" to "pointer assignment" [318:5] Insert before ", the associated actual argument": "and does not have the INTENT(IN) attribute." [318:6+] Add two new sentences at the end of the paragraph: "Otherwise, if the dummy argument is a procedure pointer with the INTENT(IN) attribute, the associated actual argument shall be a procedure pointer, a reference to a function that returns a procedure pointer, a reference to the NULL intrinsic function, or a valid target for the dummy pointer in a pointer assignment statement. If the actual argument is not a pointer, the dummy pointer becomes pointer-associated with the actual argument." [333:2] Replace "or" by a comma, then insert ", or end-mp-subprogram-stmt " after "end-subroutine-stmt ".