(j3.2006) Defined operation questions

Van Snyder Van.Snyder
Tue May 8 17:03:35 EDT 2012


Does anybody remember why "nonoptional" is required for dummy arguments
of functions that define operations (12.4.3.4.2p1)?

I tried to write an .ANDTHEN. operator with an optional second argument,
so that I could do something like "if ( present(A) .ANDTHEN. A )...", in
which the function that defines .ANDTHEN. returns false without
referencing the second argument if the first argument is false.  I can't
do this because the function that defines .ANDTHEN. can't have an
optional second argument, and therefore can't be invoked if A is not
present.

I can understand requiring the second actual argument to appear in a
reference (as already required by the syntax rules in Clause 7), but why
must it be present?

In light of the first distinguishing characteristic in 12.4.3.4.5p3, is
there still a reason for "data object" in (12.4.3.4.2p1)?

I can't offhand think of an application for a defined operation in which
one operand is a procedure, but there appears not to be a problem with
generic resolution.

-- 
Van Snyder                    |  What fraction of Americans believe 
Van.Snyder at jpl.nasa.gov       |  Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20120508/ef8cfc21/attachment.html>



More information about the J3 mailing list