J3/14-225 To: J3 From: Nick Maclaren Subject: The term 'variable' and ASSOCIATE Date: 2014 August 07 ---------------------------------------------------------------------- NUMBER: TBD TITLE: The term 'variable' and ASSOCIATE KEYWORD: ASSOCIATE, variable DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Is the following program conforming? PROGRAM Main INTEGER :: coarray[*] coarray = 10*THIS_IMAGE() ASSOCIATE (alias => coarray[1]) IF (THIS_IMAGE() == 2) PRINT *, alias END ASSOCIATE END PROGRAM Main DISCUSSION: 1.3.154 says "variable: data entity that can be defined and redefined during execution of a program". However, the term 'variable' is also used with a syntactic meaning when italicised; R602 says " is or ". 8.1.3.1 R805, C801, C803 and C804 use 'variable' in the latter sense, though C804 uses it in its Roman form (which seems to be a mistake). C803 and C804 can be read together to mean either of the following: a) The designator 'coarray[1]' is a variable and therefore the program is not conforming, or b) The designator 'coarray[1]' cannot be a variable, therefore must be an expression, so the program is conforming. C804 probably meant to use the term designator, anyway, so should read: "C804 (R805) shall not be a ." However, that does not resolve the above ambiguity. It needs to be clear exactly when the selector will be treated as an expression and when as a variable. There are two other questions that arise, but which are not part of this interpretation request: 1) I am also a little puzzled why C803 exists at all, because I cannot see what problem it is trying to resolve. As far as I can see, it would be enough to specify that the property carries over in 8.1.3.3, as is done for the property of being permitted in a variable definition context. 2) On the wider issue, I cannot search the PDF for all occurrences of the italicised form, and the word 'variable' is too common to search for all uses, so I do not know whether this problem also occurs in other constructs. ANSWER: Awaiting statement of direction. EDITS: Awaiting statement of direction. SUBMITTED BY: Nick Maclaren HISTORY: m205 14-nnn Submitted