Print

Print


Werner Schulz writes:
 > a) the pointer attribute is not used for distinguishing arguments
 > for resolving generic/overloaded procedure arguments, right?

Correct.  And it really couldn't be allowed to be distinguishing
without causing various complications and incompatabilities.  This
is because it is legal to pass a pointer actual argument to a
non-pointer dummy (as long as the pointer argument is associated).
In such a case, the pointer is dereferenced and it is the target
of the pointer that gets passed.

If there were two specific procedures distinguished only by the
pointerness of a dummy, it would be ambiguous whether a call with
a pointer actual argument was intended to pass the target to the
non-pointer dummy version or the pointer to the pointer dummy version.

Yes, one could make a special rule for this, but it would be very
quirky and inconsistent with how generics otherwise work.  By design,
there are no cases where a legal call to a generic could possibly make
sense for more than one specific.  And thus there are no cases where
adding a new specific ever changes the interpretation of a previously
legal call to the generic.  All of the special rules that I can
think of would violate these principles.

 > b)
 > If a dummy argument has the target attribute any actual argument does not
 > need the target attribute?

I think you are right, but I always have trouble reading that part of
the standard (and the various interpretations against it).  So don't
place much weight on my concurrence here.  Better wait for an answer
from someone that understands that part better.

-- 
Richard Maine
[log in to unmask]



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%