(j3.2006) Questions about passed-object dummy argument

Cohen Malcolm malcolm
Thu Dec 1 01:31:51 EST 2016


>First question: What's the point of C1536 if C761 requires the
>passed-object dummy argument to be a scalar?

There seems to be nothing wrong with this.

>  It arose from F03/0016,
>where the question was about elemental procedures.  The discussion
>included "If the type-bound procedure does not have both the PASS
>and ELEMENTAL attributes, the invoking object shall be scalar."  But the
>constraint is the other way around, and doesn't mention elementality.

It does not need to.  The constraint has that effect.

>Second question: Is it necessary for C1536 to require the PASS
>attribute, or should it instead prohibit the NOPASS attribute?  The link
>for "PASS attribute" in C1536 leads to 7.5.4.5, which describes the
>passed-object dummy argument, but doesn't mention the PASS attribute.
>In fact, the only place that "PASS attribute" appears as such is in
>C1536 (and in the index).  Just guessing, but

If you're just guessing, why not guess that we meant the obvious answer 
instead of an inconsistent one?  Since PASS(firstarg) is equivalent 
otherwise to omitting the PASS clause altogether.

The text is certainly easy to clarify, viz "the PASS attribute" -> "a 
passed-object dummy argument".

And/Or we could add some more text about the PASS attribute.  In fact we 
probably should add some more text since it is somewhat under-specified.

>Third question: Why was it necessary to require the passed-object dummy
>argument to be a scalar?

That was the decision made during F2003 development.  At this point I'm not 
going to spend time on such a question.

>Fourth question: Could we remove "scalar" from C761,

Not now.  That would be a significant new feature.  It might or might not be 
possible at some point in the future.

> and replace C1536
>with something like the following?

No, this would open a different can of worms.

(And the wording change I suggested above is sufficient to clarify the 
meaning.)

Cheers,
-- 
.............Malcolm Cohen, NAG Oxford/Tokyo. 




More information about the J3 mailing list