(j3.2006) Second thoughts about DIM arguments

Van Snyder Van.Snyder
Wed Mar 10 17:01:13 EST 2010


Yesterday I offered an opinion about how the optional DIM argument ought
to be described for those intrinsic functions where its presence
determines the rank of the result.  I suggested that some of them could
be described either as optional arguments or by showing two interfaces,
one with DIM and one without.  Some with more than one optional argument
can't be described using two interfaces without introducing technical
changes.

Anyway, it's pretty clear that the rank of the result can be determined,
even if the DIM argument is a disassociated pointer or unallocated
allocatable.  In those cases, however, the invocation can't be executed
-- but that's a different question from what the rank of the result is.

So, I don't think we need any interps.  I don't think we need to change
any description from "absent" to "does not appear," although that
wouldn't hurt anything since the actual argument is not allowed to be an
optional dummy argument.  The advantage of changing it is that we could
remove the prohibitions against optional dummy arguments, since that's
covered elsewhere (an absent optional dummy can't correspond as an
actual argument to a nonoptional dummy).

It would be helpful to describe CSHIFT and EOSHIFT using "absent"
instead of "omitted" (or "does not appear" if we choose to go in that
direction).  These are the only two places where "omitted" appears in
Clause 13.

====================================================================
ANY can go either way.
COUNT has to be described using "does not appear".
CSHIFT doesn't use DIM to determine the rank, but uses "omitted" and
"present" instead of "absent" and "present".
Same for EOSHIFT.
FINDLOC is already described using two interfaces.
IALL is already described using two interfaces.
IANY is already described using two interfaces.
IPARITY is already described using two interfaces.
LBOUND has to be described using "does not appear".
LCOBOUND has to be described using "does not appear".
MAXLOC is already described using two interfaces.
MAXVAL is already described using two interfaces.
MINLOC is already described using two interfaces.
MINVAL is already described using two interfaces.
NORM2 can go either way.
PARITY can go either way.
PRODUCT is already described using two interfaces.
SUM is already described using two interfaces.
UBOUND has to be described using "does not appear".
UCOBOUND has to be described using "does not appear".
====================================================================





More information about the J3 mailing list