Anton,
I don't think there is a problem here either. 19.6.5 of the CD lists all
the events that cause variables to become defined and in each case says
which variable is involved. In this case, we are talking about an
intrinsic assignment statement and it is the variable that precedes the
equals that becomes defined.
Cheers,
John.
Anton Shterenlikht wrote:
>> Anton,
>>
>> The variables that are being defined here are i(1) and i(4). An array
>> assignment such as i = this_image() defines the array i.
>
> But the value of array i, as a whole, would have
> changed when one or more if its elements are defined,
> so is it wrong to say that i is being defined too?
>
> What about this program?
>
> type t
> integer :: left, centre(2), right
> end type t
> type(t) :: i[*]
> i%left = this_image()
> i%centre = this_image()
> i%right = this_image()
> sync all
> if ( this_image() .gt. 1 ) i%left = i[ this_image() - 1 ]%centre(1)
> if ( this_image() .lt. num_images() ) i%right = i[ this_image() + 1 ]%centre(2)
> sync all
> write (*,*) this_image(), i
> end
>
> Here the variable being defined are
> i%left and i%right, while only
> i%centre is referenced. But these are
> 3 components of a single coarray variable i.
> Does this not break the rules?
>
> Anton
>
|