(j3.2006) Syntax doesn't allow coindexed scalars?
Malcolm Cohen
malcolm
Fri Jan 16 01:24:01 UTC 2009
Van Snyder wrote:
> The syntax doesn't allow coindexed scalars (unless they're structure
> components), coindexed substrings, or coindexed complex part
> designators.
>
Actually it is that it does not allow coindexed names. I seem to recall
that it was deliberately decided to disallow a whole-array coreference
(i.e. without a section-subscript-list), and this would be fallout from
that decision.
Oh, and it doesn't allow coindexed complex part designators either
unless the designator piece is an array element, structure component, or
array section. At least at first glance.
> I suspect we should put [ <image-selector> ] on the end of R602
> <variable> <<is>> <designator> instead of the end R612 <part-ref>.
>
>
That would be wrong. For a start it would not allow complex part
designators to be coindexed *EVER*.
I think we need a new production for R601 designator,
<<or>> <coindexed-named-object>
R6nn <coindexed-named-object> <<is>> <data-ref>
C6mm (R6nn) The <data-ref> shall contain exactly one <part-ref>. That
<part-ref> shall have an <image-selector> and no
<section-subscript-list>, and the <part-name> shall be scalar.
Note that using a constrained <data-ref> here means we don't have to
repeat the existing coarray-specific constraints on <data-ref>.
Personally I'd be in favour of omitting the last requirement, which just
makes life complicated for standards writers, standards readers,
compiler writers, and users, without as far as I can see delivering any
benefits.
Cheers,
--
..................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list