J3/13-213 To: J3 From: Van Snyder Subject: Optional arguments for operator or assignment procedures Date: 2013 December 19 References: 04-187; 2004 hate-dislike-like-love score 0-0-9-2 Title: Optional arguments for operator or assignment procedures Submitted by: Van Snyder Status: For consideration Basic functionality: Allow procedures that define operators or assignment to have optional arguments. Rationale: Reduces the need to write wrappers, and thereby long-term cost. Estimated impact: Minor Markham M6 conformance: Remove simple deficiency and discrepancy. Detailed specification: Allow procedures that define operators or assignment to have optional arguments. Draft edits: To estimate scope of project Replace 12.4.3.4.2p1: "If OPERATOR is specified in a generic specification, all of the procedures in the generic interface shall be functions that can be referenced as defined operations (7.1.6, 12.5). OPERATOR shall not be specified for functions with no arguments. If a function is referenced using prefix operator notation, the operand corresponds to the first dummy argument, and any dummy arguments after the first shall be optional. If a function is referenced using infix operator notation, it shall have at least two arguments, the first operand corresponds to the first dummy argument, the second operand corresponds to the second dummy argument, and any dummy arguments after the second shall be optional. A dummy argument to which an operand is associated shall be a dummy data object with INTENT(IN). \obs{The function result shall not have assumed character length.} If the operator is an (R309), the number of dummy arguments shall not be less than the number required for intrinsic uses of that operator, and the types, kind type parameters, or ranks of the dummy arguments that correspond to operands shall differ from those required for the intrinsic operation (7.1.5)." { The rules for generic resolution already handle optional arguments if the procedure is referenced as a . } Replace first two sentences of 12.4.3.4.3p2: "Each of these subroutines shall have at least two dummy arguments. The first two dummy arguments shall be dummy data objects. The first shall have INTENT(OUT) or INTENT(INOUT) and the second shall have INTENT(IN). Any dummy arguments after the second shall be optional." { The rules for generic resolution already handle optional arguments if the procedure is referenced as a . }