(j3.2006) a question on cobounds
Malcolm Cohen
malcolm
Tue Jul 28 20:37:16 EDT 2009
Bill Long wrote:
> Malcolm Cohen wrote:
>
>
>> My followup question 2 relates to the text you quoted, which says
>> "If an explicit-coshape coarray has cobounds that are not constant
>> expressions, the cobounds are determined at entry to the procedure ...".
>> Well, if the definition appears in an interface body or derived type
>> definition, those are not procedures. Therefore explicit-coshape
>> coarrays are not allowed in interface bodies or derived type definitions
>> (seeing as how the standard just got an internal error). That would
>> seem to be a problem for nonallocatable dummy coarrays.
>>
>
>
> I don't understand the argument regarding interfaces. If the interface
> body and the corresponding subroutine definition are to match and you
> allow non-constant cobounds one place, they have to be allowed in the
> other as well. This parallels the case of an explicit-shape array in a
> subroutine that has bounds specified by variables. Certainly a
> declaration like this is allowed in an interface body.
>
Then the wording is wrong. In fact the wording is undeniably wrong,
when it talks about "the procedure" when there is none.
We have correct wording elsewhere that doesn't require false-to-fact
things to be ignored to understand the standard, the same here.
So the wording should be something like "If an explicit-coshape coarray
is a local variable of a procedure or BLOCK construct and ..." so it
doesn't say that impossible stuff happens for interface blocks. Those
aren't carefully crafted words, I'm just going on my memory of what we
say for ordinary arrays.
Cheers,
--
........................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list