To: J3 10-110r1
From: John Reid
Subject: Comment GB-7: Clarification of rectangular pattern (2.4.7)
Date: 2010 February 15
References: WG5/N1802, WG5/N1803, J3/09-007r3
DISCUSSION
The following constructions are not clearly permitted by the text of 5.3.6
CODIMENSION attribute, though they are by 13.7.172 (UCOBOUND), and there
is a clarificatory NOTE in 6.6 (Image selectors). Neither is an obvious
place to look for the precise specification of explicit-coshape-spec.
! running on 17 images
INTEGER, SAVE :: coarray_1(10)[5,*], coarray_2(10)[34,*]
! and similarly for ALLOCATE
The root of the problem, however, lies elsewhere. The initial description
of coarray in 2.4.7 says, in paragraph 3:
"The set of corresponding coarrays on all images is arranged in a
rectangular pattern. The dimensions of this pattern are the
codimensions; the number of codimensions is the corank. The bounds
for each codimension are the cobounds."
In conventional mathematics, the size of a rectangle is an exact multiple
of each side, and that is not the case here. That is confusing. That is
also true for assumed-size arrays, but the potential for confusion there
is much less.
EDITS
[37:11+] In 2.4.7 "Coarray", after paragraph 3, add the new NOTE:
"NOTE 2.12a
If the total number of images is not a multiple of the product of
the extents in each but the rightmost of the codimensions, the
rectangular pattern will be incomplete."