To: J3 J3/26-224 From: Malcolm Cohen Subject: Interp F23/030 on conditional arguments/expressions Date: 2026-October-26 ---------------------------------------------------------------------- NUMBER: F23/030 TITLE: Are conditional expressions allowed as actual arguments? KEYWORDS: conditional expression, conditional argument DEFECT TYPE: Erratum STATUS: J3 consideration in progress REFERENCES: 24-007 QUESTION: Consider ! a and b are variables. CALL sub( ( a>b ? a : b ) ) Is the actual argument (i) a conditional-arg, in which case the effective argument is one of the variables a or b, and the dummy argument is definable, or (ii) an expr that is a conditional-expr, in which case the effective argument is the value of a or b, and the dummy argument is not definable. Constraint C1535 says "An actual-arg that is an expr shall not be a variable or a conditional-arg." However, that does not rule out the conditional-expr case. In fact it is impossible to reach the conditional-arg production starting from expr, other than in a nested function reference, thus an expr cannot be a conditional-arg, i.e. the constraint does not do anything. This program fragment thus seems to be ambiguous, and thus not conforming. Should this program fragment be conforming, and if so, how is the ambiguity resolved? ANSWER: This was intended to be conforming, and the actual argument should be a conditional-arg. An edit is provided to correct the mistake in constraint C1535. After this edit, an actual-arg cannot be a conditional-expr; however, no functionality is lost, as it can still be a parenthesised conditional-expr. EDIT to 24-007. [322:4] 15.5.1 Syntax of a procedure reference, C1535 beginning "An actual-arg that is an expr..." change "conditional-arg" to "conditional-expr". SUBMITTED BY: Malcolm Cohen HISTORY: 26-nnn m241 Submitted ----------------------------------------------------------------------