Nils Smeds said:
> I think that the wording in the standard tries to state the "obvious" fact
> that a TARGET variable can be modified through the variable or through the
> use of a POINTER associated with the variable. It is not trying to relax
> the restriction on the _actual_ arguments used in calling the subroutine.
Not so; the standard makes no such distinction.
The "non-aliasing" requirements in the standard may be stated briefly as
"A dummy argument is not aliased to ANYTHING ELSE."
Obviously, to get pointers/targets to work at all (people do like to build
lists and things and have them work, even via dummy arguments!), one must
lift that restriction when the dummy is a POINTER.
(And when I say "lift ..." I mean that the "non-aliasing" requirements for
dummy arguments are completely lifted.)
And to make certain "obvious" facilities available - viz, that associating
a pointer with a TARGET dummy associates it with the actual argument (under
certain conditions), the restriction must be lifted for TARGET dummy
arguments (with those conditions) as well.
This was debated at enormous length when resolving the hugely complicated
F90 interpretation requests 125 and 81. It took over three years to
resolve the previously unsatisfactory situation (where the standard was not
clear and so vendors implemented different things and users expected
different things). Not surprisingly, the final outcome did not perhaps
fulfill everyone's hearts' desires. I must say that opening this can of
worms again would not be top of my priorities ever.
Cheers,
--
...........................Malcolm Cohen, NAG Ltd., Oxford, U.K.
([log in to unmask])
|