Neil Carlson wrote:
>> In the case in question, the dummy argument is 'a', the subobject is a%x,
>> and a%x appears as the 'variable' in an assignment statement, therefore
this
>> is disallowed since 'a' is INTENT(IN).
>
>But it depends on the context as to what a%x "is". In the expression
>a%x = 1, a%x isn't the pointer at all but rather the target, while in
>a%x => ..., a%x is the pointer. I think this relates to Richard Maine's
>statement in the previous thread that the target is not a subobject of
>the dummy argument.
By my reading, the target isn't relevant here. a%x is a subobject of a, and
it appears on the left side of an assignment statement. It is true that if
the assignment is performed, then what is modified is the target, but you
haven't gotten that far yet. The constraints for INTENT(IN) don't discuss
the target, they say what is not allowed to appear on the left side of an
assignment statement, and a subobject of an argument with INTENT(IN) is one
of them.
Are you arguing that a%x is not a subobject of a?
Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH
|