J3/01-220r1
Date: 17-Jun-2001
To: J3
From: interp/Stan Whitlock
Subject: Interpretation F90/000204 (Meaning of "same variable"
description of MVBITS)
Here is the edited interp F90/000204 that passed at meeting #157.
/Stan
----------------------------------------------------------------------
NUMBER: F90/000204
TITLE: Meaning of "same variable" description of MVBITS
KEYWORDS: MVBITS
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
QUESTION: Section 13.14.75 states "TO ... may be the same
variable as FROM". Given the following statements, which
pairs of variables are the same?
INTEGER :: I(10), J(10)
EQUIVALENCE (I,J)
INTEGER, TARGET :: T(2:11)
INTEGER, POINTER :: P1(:), P2(:)
P1 => T
P2 => T(2:11)
I and I P1 and T
I(1) and I(1) P1 and T(2:11)
I(1:10) and I(1:10) P2 and T
I(1:1) and I(1:1:-1) P2 and T(2:11)
I and I(1:10) P1 and P2
I and J
I(1) and J(1)
I(1:10) and J(1:10)
I(1:1) and J(1:1:-1)
I and J(1:10)
ANSWER:
The quoted wording makes it clear that calls with the same name for
FROM and TO, such as
CALL MVBITS(DATA,2,2,DATA,0) ! Overwrite bits 0,1 by bits 2,3
are permitted. It was also intended that associated variables be
permitted. The edits correct this.
EDITS:
In the second line of the final paragraph of subclause 12.7.3
[215:4], after 'may be the same variables', add 'and may be
associated scalar variables or associated array variables all of
whose corresponding elements are associated'.
In subclause 13.14.75, in the second line of the paragraph that
defines the effect of TO [258:21] change 'and may be the same
variable as FROM' to 'and may be associated with FROM (12.7.3)'.
SUBMITTED BY: /jor in response to IBM public comments
HISTORY: 95-299 m135 submitted
01-220r1 m157 Passed by J3 meeting