J3/17-218 To: J3 From: Malcolm Cohen Subject: INTENT(IN) exposition clarification Date: 2017 October 11 1. Introduction It has come to light that some people have misinterpreted the wording of the INTENT(IN) restrictions for pointers. This paper proposes some wording clarifications to make this harder to misunderstand. 2. Edits to 17-007r2 (N2137) [108:33] 8.5.10 INTENT attribute, p6, "If an object" -> "If a nonpointer object". This makes the whole paragraph read: "If a nonpointer object has an INTENT attribute, then all of its subobjects have the same INTENT attribute." {This is not a technical change, since if the statement applied to the subobjects of the target of a pointer, a contradiction would immediately arise.} [109:0+5,8] Same subclause, NOTE 8.17, 1st sentence: After "If a dummy argument is a" insert "nonpointer". 3rd sentence: After "For example, if X is a" insert "nonpointer". This makes the first sentence read "If a dummy argument is a nonpointer derived-type object with a pointer component, then the pointer as a pointer is a subobject of the dummy argument, but the target of the pointer is not." and the start of the 3rd sentence becomes "For example, if X is a nonpointer dummy argument of derived type with an integer pointer component P, and X is INTENT (IN), then the statement" {This makes it crystal clear that the first part of the NOTE is talking only about the nonpointer case. The pointer case is covered by the 2nd paragraph of the NOTE - and although interpreting the first part to cover the pointer case leads straightaway to a contradiction with the second part, it's easy to stop reading prematurely and come to the wrong conclusion.} ===END===