Compiler B is correct. The audit trail is
R908
R909
R914 & C921
R911
R912
Cheers,
John.
Anton Shterenlikht wrote:
> For coarrays of DT, components follow the image selector,
> as in X[...]%...
>
> For array coarrays, the array section precedes the image
> selector, as in X(... : ... )[...].
>
> What about coarray substrings?
> Does the substring spec appear
> before or after the image selector?
> Can somebody point me to the relevant place in DIS please.
>
> If I put the substring before the image selector:
>
> character( len=2 ) a[*]
> if ( this_image() .eq. 1 ) a(2:2)[2] = 'Z'
> a(1:1) = "X"
> end
>
> compiler A accepts, compiler B rejects with:
>
> Unknown statement. Expected assignment statement but found "[" instead of "=" or "=>".
>
> If I put the other way round:
>
> character( len=2 ) a[*]
> if ( this_image() .eq. 1 ) a[2](2:2) = 'Z'
> a(1:1) = "X"
> end
>
> then compiler B accpepts, but A rejects with:
>
> Syntax error, found '(' when expecting one of: => = . %
>
> Thanks
>
> Anton
>
|