To: J3                                                     J3/27-100
From: Malcolm Cohen
Subject: J3 Fortran interp letter ballot #41 - due 30-November-2026
Date: 2026-November-03

Enclosed is the next letter ballot on Fortran interpretations.

This is a formal letter ballot; only one vote per principal member.
An alternate member may vote if the principal member does not vote;
in any case, comments are welcome from non-voting alternates and from
members of WG5 that are not J3 members, and will be taken into
consideration by J3/interp. Although "votes" (recommendations) from
non-voters do not affect the official vote tally, they will however be
recorded in the voting results table in lower case.

The rules for interpretation handling by which we operate say:

    o   J3 votes on the answer at a J3 meeting; a simple majority vote
        marks the answer as "passed by J3 meeting".

    o   Between J3 meetings the chair of /interp sends a J3 letter ballot to J3
        to approve interp answers that have been "passed by J3 meeting".
        The letter ballot runs for 30 days.  An interp answer passes by a
        2/3rds vote;  a no vote must be accompanied by an explanation of the
        changes necessary to change the member's vote to yes.

        J3/interp reserves the right to recall an interp answer for more study
        even if the answer passes.


12 Fortran interpretations are currently "Passed by J3 meeting" after J3
meeting #241. This is the letter ballot phase to go from "Passed by J3 meeting"
to "Passed by J3 letter ballot".


The following Fortran interpretations are being balloted:

Yes  No   Number    Title

---  ---  F23/019  Is CHANGE TEAM or END TEAM a possible branch target
---  ---  F23/020  Fixed form statement length
---  ---  F23/021  May a simple procedure depend on common pointer association?
---  ---  F23/022  REDUCE OPERATION result characteristics
---  ---  F23/023  REDUCE OPERATION associativity
---  ---  F23/024  May a simple procedure depend on variables on other images?
---  ---  F23/025  Why is IEEE_GET_HALTING_MODE prohibited from DO CONCURRENT?
---  ---  F23/026  IEEE_SCALB does not conform to ISO/IEC/IEEE 60559
---  ---  F23/027  IEEE_SCALB is not defined for finite non-integral values of I
---  ---  F23/028  Is NOTIFY WAIT permitted everywhere?
---  ---  F23/029  Can a variable of type NOTIFY_TYPE be a pointer?
---  ---  F23/030  Are conditional expressions allowed as actual arguments?


The text of these interpretations is attached.
Each interpretation starts and ends with a row of "-"s.

Please mark the above -Y- in the Yes column for "yes", -C- in the Yes column
for "yes with comment", or -N- in the No column for a "no" answer; be sure to
include your reasons if voting "no".

Then, send only the above text as modified, not this entire mail message,
with any comments to

        j3@j3-fortran.org

by 23:59:59 PST, Monday 30-November-2026, in order to be counted.


Thanks                         /Malcolm


----------------------------------------------------------------------

NUMBER: F23/019
TITLE: Is CHANGE TEAM or END TEAM a possible branch target
KEYWORDS: CHANGE TEAM construct, branching
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007

QUESTION:

Consider the following program fragment:

    IF (NUM_IMAGES()>1) GO TO 100
    STOP 'Not enough images'
100 CHANGE TEAM (myteam)
        IF (THIS_IMAGE()==1) GO TO 200
        PRINT *,'HELLO',THIS_IMAGE()
200 END TEAM

Are the GO TO 100 and GO TO 200 statements valid?

11.1.5.2 Execution of a CHANGE TEAM construct, p3 states
    "It is permissible to branch to an end-change-team-stmt only from
     within its CHANGE TEAM construct."
which says that GO TO 200 is permitted, but 11.2.1 Branch concepts,
p1 states
    "A branch target statement is an action-stmt, ..."
and end-change-team-stmt (the BNF term for the END TEAM statement) do
not appear in the list. Then, the GO TO statement has the constraint
    "C1174 (R1159) The label shall be the statement label of a branch
     target statement..."

Similarly, the change-team-stmt does not appear in the list of branch
target statements, which would mean that the GO TO 100 statement is
invalid. (I could not find any text that contradicted that.)

ANSWER:

The CHANGE TEAM and END TEAM statements were intended to be possible
branch targets; their omission from the definition of branch target
statement was inadvertent.

Note that just like CRITICAL and DO CONCURRENT, the initial statement
of the CHANGE TEAM construct is not considered to be within the
construct for the purposes of branching.

EDITS to 24-007:

[6:35-39] 3.18 branch target statement, Note 1 to entry,
          Replace the entire Note with the more future-proof
   "Branching is described in 11.2. The statements that are
    permissible branch targets are listed in 11.2.1."
{Given the hyperlink, we never needed to duplicate this list.}

[213:25] 11.2.1 Branch concepts, p1, final sentence,
         after "end-associate-stmt,"
         insert "change-team-stmt, end-change-team-stmt,".
{In a future revision this list should be an alphabetic table,
 but changing the format is inappropriate in a corrigendum.
 I picked "after end-associate-stmt" because the next thing is the
 IF construct, and CHANGE TEAM is described in between those two.
 The rest of the list is all over the place though. I didn't want to
 add to the end of the list as that means moving the "or".}

SUBMITTED BY: Malcolm Cohen

HISTORY: 25-160   m236  Submitted
         26-111   m238  Revised and passed by J3 meeting 238.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/020
TITLE: Fixed form statement length
KEYWORDS:  fixed-form, continuation
DEFECT TYPE: Defect
STATUS: J3 consideration in progress

QUESTION:

Fortran 2023 6.3.2.6 Free form statements, paragraph 2 says,
    "A statement shall not have more than one million characters."
The subclause title implies that this rule applies only to free form
source, and that is confirmed by 6.3.1p3 which says,
    "The rules in 6.3.2 apply only to free form source".
There is no longer any similar restriction in 6.3.3 Fixed source form;
in Fortran 2018 this had a limit of 255 continuation lines.

Was it intended to remove all restrictions on continuations and
statement length for fixed form source?

ANSWER:

No, the new limit on overall statement length was intended to apply
also to fixed source form. Edits are provided to correct the error.

EDITS to 24-007:

[57:6+] 6.3.1 Source form, Program units, statements and lines,
        After paragraph 2, insert a new paragraph:

   "A statement shall not have more than one million characters."

[58:30] 6.3.2.6 Free form statements,
        Delete paragraph 2
            "A statement shall not have more than one million
             characters."

SUBMITTED BY: Steve Lionel

HISTORY: 26-100   m238  F23/020 submitted
         26-100   m238  Passed by J3 meeting 238.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/021
TITLE: May a simple procedure depend on common pointer association?
KEYWORDS: POINTER, COMMON, ASSOCIATED, SIMPLE
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007

QUESTION:

Consider
    SIMPLE SUBROUTINE example(x)
      LOGICAL,INTENT(INOUT) :: x
      COMMON/C/p
      REAL,POINTER :: p
      x = ASSOCIATED(p)
    END SUBROUTINE

Is this conforming?

Constraint C15116 "A simple subprogram shall not contain a reference
                   to a variable in a common block."
is ineffective, as appearing in ASSOCIATED is not a reference.

However, a pointer accessed by use or host association cannot have its
pointer association status queried in this way in a simple procedure
(constraint C15115 is effective, as it only permits inquiry function
references that are constant expressions).

That indicates that this example was probably not intended to be
conforming.

ANSWER:

The example was not intended to be conforming.
Simple procedures should not depend on nonlocal variables in this way.

EDITS to 24-007:

The best fix is probably to include variables in common in C15115
which is not defective, and to delete the defective C15116. This can
be done without renumbering the rest of the constraints (such
renumbering would be appropriate in the next revision, not in a
corrigendum).

[348:6] 15.8 Simple procedures, constraint C15115,
        after "shall not contain a designator"
        insert "\obs{of a variable in a common block, or}",
        making the whole constraint read:
   "C15115 A simple subprogram shall not contain a designator of a
           variable in a common block, or of a variable that is
           accessed by use or host association, unless the designator
           is part of a specification inquiry (10.1.11) that is a
           constant expression."

[348:8] Same subclause, delete constraint C15116 which reads
   "C15116 A simple subprogram shall not contain a reference to a
           variable in a common block."

SUBMITTED BY: Malcolm Cohen

HISTORY: 26-200   m241  Submitted
         26-200   m241  Passed by J3 meeting 241.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/022
TITLE: REDUCE OPERATION result characteristics
KEYWORDS: REDUCE, allocatable, pointer
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007

QUESTION:
May the OPERATION function provided to REDUCE have an allocatable or
pointer result?

ANSWER:
No, it was not intended that the OPERATION function provided to
REDUCE allow an allocatable or pointer result.
An edit is provided to correct this oversight.

EDITS to 24-007:
[34:1+] clause 4.3.3 Fortran 2018 Compatibility
Insert the following paragraph:

"Fortran 2018 permitted the OPERATION argument to REDUCE to have an
allocatable or pointer result; this document does not permit such
usage."

[436:16] 16.9.1.73 REDUCE, para 3, OPERATION argument

Before "nonpolymorphic", insert:

 "nonallocatable, nonpointer, "

Such that the entire sentence reads:

 "Its result shall be a nonallocatable, nonpointer, nonpolymorphic
  scalar and have the same declared type and type parameters as
  ARRAY."

SUBMITTED BY: Dan Bonachea, Lorri Menard

HISTORY:26-216     m241  Submitted
        26-216r2   m241  Passed as amended by J3 meeting 241.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/023
TITLE: REDUCE OPERATION associativity
KEYWORDS: REDUCE, ORDERED, associative
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007

QUESTION:
On a REDUCE invocation where ORDERED has the value true, must the
OPERATION argument be mathematically associative?

ANSWER:
No, it was not intended to recommend associativity when ORDERED is
present with the value true.
When ORDERED is present with the value true the order of evaluations
is fully specified, therefore a lack of associativity would not
affect the result.

An edit is provided to correct this oversight.

EDITS to 24-007:

[436:17-18] 16.9.1.73 REDUCE, para 3, OPERATION argument

Before "OPERATION", insert:

 "If ORDERED is absent or false, then "

Such that the entire sentence reads:

 "If ORDERED is absent or false, then OPERATION should implement a
  mathematically associative operation.


SUBMITTED BY: Dan Bonachea, Lorri Menard

HISTORY: 26-217     m241  Submitted
         26-217r2   m241  Passed as amended by J3 meeting 241.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/024
TITLE: May a simple procedure depend on variables on other images?
KEYWORDS: coarray, coindexed, SIMPLE
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007

QUESTION:

Consider

    REAL SIMPLE FUNCTION f(x)
        REAL,INTENT(IN) :: x[*]
        f = x[Mod(This_Image(),Num_Images())+1]
    END FUNCTION

This function depends on the value of a variable on another image when
the number of images is greater than one. A variable on another image
is the very epitome of a nonlocal variable.

Just as a pure procedure is forbidden to write to a variable that
could be on another image (C15104), surely a simple procedure should
be forbidden to read from a such variable.

Is the above function intended to be conforming?

ANSWER:

The example was not intended to be conforming.
An edit is provided to correct this oversight.

EDIT to 24-007:

[348:7+] 15.8 Simple procedures, immediately after the antepenultimate
         constraint C15115 "A simple subprogram shall...",
         insert new constraint
 "C15115a A simple subprogram shall not contain an <image-selector>."

SUBMITTED BY: Malcolm Cohen

HISTORY: 26-203   m241  Submitted
         26-203   m241  Passed by J3 meeting 241.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/025
TITLE: Why is IEEE_GET_HALTING_MODE prohibited from DO CONCURRENT?
KEYWORDS: IEEE_GET_HALTING_MODE, DO CONCURRENT
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007

QUESTION:

It is not obvious why the simple subroutine IEEE_GET_HALTING_MODE is
prohibited from appearing in DO CONCURRENT, because

(1) the similar IEEE_GET_ROUNDING_MODE and IEEE_GET_UNDERFLOW_MODE
    are permitted,

(2) the prohibition is completely ineffective because halting modes,
    like all modes, flow down and not up, which means that the
    following simple subroutine has the same effect that
    IEEE_GET_HALTING_MODE would have if permitted:

    SIMPLE ELEMENTAL SUBROUTINE my_get_halting_mode(flag,halting)
        TYPE(IEEE_FLAG_TYPE),INTENT(IN) :: flag
        LOGICAL,INTENT(OUT) :: halting
        CALL ieee_get_halting_mode(flag,halting)
    END SUBROUTINE

(3) and, the procedure IEEE_SET_HALTING_MODE is not permitted in DO
    CONCURRENT, so there is no possibility of cross-iteration
    communication if IEEE_GET_HALTING_MODE were allowed.

Should this superfluous and ineffective restriction still apply?

ANSWER:

No, this restriction should not still apply. This was a mistake in
Fortran 2008, which added DO CONCURRENT.

Edits are supplied to remove the restriction.

EDITS to 24-007:

[xiv] Introduction, "Intrinsic modules" bullet,
      after the sentence "The subroutines IEEE_GET_MODES,...",
      insert new sentence
        "A reference to the subroutine IEEE_GET_HALTING_MODE can
         appear within a DO CONCURRENT construct."
{Notify programmers and vendors of the change.}

[200:35] 11.1.7.5 Additional semantics for DO CONCURRENT constructs,
         constraint C1145 which begins
            "A reference to the procedure IEEE_GET_FLAG,"
         delete "IEEE_GET_HALTING_MODE,".
{Delete the restriction.}

SUBMITTED BY: Malcolm Cohen

HISTORY: 26-209   m241  Submitted
         26-209   m241  Passed by J3 meeting 241.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/026
TITLE: IEEE_SCALB does not conform to ISO/IEC/IEEE 60559
KEYWORDS: IEEE_SCALB, ISO/IEC/IEEE 60559
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007, N2244 (F2023 draft corrigendum 1), N2258

QUESTION:

IEEE_SCALB, as per 24-007 with the changes in N2244 (corrigendum 1)
still fails to conform to ISO/IEC/IEEE 60559 as listed below.

It will be easier to view this in N2258 (draft CD for F2028), as that
has the corrigendum changes applied in-place.

Problem 1: it talks about 2**I, but 60559 states b**I, where b is the
           radix. That is, RADIX(X)**I.

Problem 2: Case (ii), which is X*2**I too large, says that the
           exception IEEE_OVERFLOW occurs. 60559 states that this also
           raises INEXACT (see 60559:7.4).

Problem 3: Case (iii), the underflow case. Again, 60559 states that
           this also raises INEXACT (see 60559:7.5).

Problem 4: Case (iv), X infinite, says that the result is X, with no
           exception raised. This is only true for finite I. When I
           is a NaN, the result is a NaN (and INVALID signals iff I is
           a signalling NaN). When I is -Infinity, the limit as I
           approaches -INF for b**I is zero, leaving us with X*0,
           and INF*0 is a NaN and INVALID signals.

Are these deviations from 60559 deliberate?

ANSWER:

No, these deviations are due to an oversight.
Edits are supplied to bring IEEE_SCALB into conformance with 60559.

EDITS to 24-007.

[472:bottom-8] 17.10 Summary of the procedures, Table 17.2,
             entry for IEEE_SCALB,
             change "2" to "RADIX (X)".
{Editor: Hyperlink to the RADIX intrinsic if reasonably possible.}

[488:2] 17.11.37 IEEE_SCALB, p1 Description,
        Change "2" to "RADIX (X)".

[488:10,11,14] Same subclause, p6 Result Value, Cases (i), (ii), (iii)
               Change "2" to "RADIX (X)", thrice.

[488:11,14] Same paragraph, Cases (ii) and (iii),
            after "shall occur" insert ", together with IEEE_INEXACT",
            twice.

[488:16] Same paragraph, Case (iv),
         after "infinite"
         insert "and I is finite or positive infinity".
         Append sentence
            "If X is infinite and I is negative infinity, the
             IEEE_INVALID exception shall signal; the result is a
             quiet NaN."
{That makes that case read:
    Case (iv): If X is infinite and I is finite or positive infinity,
               the result is the same as X; no exception signals. If X
               is infinite and I is negative infinity, the
               IEEE_INVALID exception shall signal; the result is a
               quiet NaN."}

Note: This leaves the NaN argument case unspecified, but the default
      handling is correct (raise INVALID if any is a signalling NaN,
      return a quiet NaN).

Note: This leaves the NaN argument case unspecified, but the default
      handling is correct (raise INVALID if any is a signalling NaN,
      return a quiet NaN).

EDITS to text inserted by Corrigendum 1:

[34:14+] 4.3.3 Fortran 2018 compatibility, p5,
         bullet inserted by the corrigendum,
         Change "2" to "RADIX (X)", twice.

[35:17+] 4.3.4 Fortran 2008 compatibility, p15,
         bullet inserted by the corrigendum,
         Change "2" to "RADIX (X)", twice.

[36:13+] 4.3.5 Fortran 2003 compatibility, p13,
         bullet inserted by the corrigendum,
         Change "2" to "RADIX (X)", twice.

SUBMITTED BY: Malcolm Cohen

HISTORY: 26-210   m241  Submitted
         26-210r1 m241  Passed as amended by J3 meeting 241.
         26-210r2 m241  Passed by J3 meeting 241 with extra edits.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/027
TITLE: IEEE_SCALB is not defined for finite non-integral values of I
KEYWORDS: IEEE_SCALB, ISO/IEC/IEEE 60559
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007, N2244 (F2023 draft corrigendum 1)

QUESTION:

The description of IEEE_SCALB does not describe the result when I is
finite and non-integral.

ISO/IEC/IEEE 60559 says that says non-integral I is language-defined,
but we do not define it.

That means that a program which does
    PRINT *,IEEE_SCALB(x,1.54)
has no established interpretation, and is thus non-conforming.
That is probably an overreaction to a numerical error.

The C standard does not have a floating-point I argument,
so we cannot get guidance from them.

There are two obvious possibilities:
    (1) raise INVALID, return NaN, because you cannot add a noninteger
        value to the exponent.
    (2) raise INEXACT and return X*(RADIX(X)**I). That would require a
        significant effort if we want it to avoid overflow/underflow
        in the calculation of RADIX(X)**I. It also fails to alert the
        user to the mistake (no-one looks at INEXACT, which was likely
        already set from an earlier calculation anyway).

What should the result be, or should this continue to be
completely non-conforming.

ANSWER:

This was not intended to be non-conforming.
The robust result is that INVALID should be raised,
and the result should be a quiet NaN.

An edit is provided to correct this oversight.

EDIT to 24-007.

[488:16+] 17.11.37 IEEE_SCALB, p6 Result Value,
          Append new case
   "Case (v): If X and I are finite, and I is non-integral, the
              IEEE_INVALID exception shall occur. If
              IEEE_SUPPORT_NAN(X) is true, the result value is a
              quiet NaN."

SUBMITTED BY: Malcolm Cohen

HISTORY: 26-211   m241  Submitted
         26-211r1 m241  Passed as amended by J3 meeting 241.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/028
TITLE: Is NOTIFY WAIT permitted everywhere?
KEYWORDS: NOTIFY WAIT, CRITICAL, PURE, SIMPLE
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007

QUESTION:

NOTIFY WAIT does (a special form of) cross-image synchronisation, but
does not appear to have any limit on where it may appear.

EVENT WAIT does a similarly special form of synchronisation, but as it
is an image control statement, there are limits on its appearance.

A reference to a collective subroutine - which also has a certain
amount of synchronisation (mostly internal) - is not an image control
statement, but has similar limits on its appearance.

It would appear to be highly desirable to prohibit NOTIFY WAIT from
contexts where the chance of deadlock is increased, for example, in a
CRITICAL construct.

Introducing synchronisation delays into pure procedures would seem to
be undesirable, and depending on variable definition on other images
is clearly contrary to the design of simple procedures.

Should there be some limits on where NOTIFY WAIT may appear, perhaps
similar to those on collective subroutine invocations?

ANSWER:

Yes, NOTIFY WAIT should be prohibited from problematic contexts.

An edit is provided to correct this oversight.

EDIT to 24-007.

[215:11+] 11.6 NOTIFY WAIT statement, after C1178
            "A notify-variable... coindexed object."
          insert new constraint
   "C1178a A NOTIFY WAIT statement shall not appear in a context where
           an image control statement is not permitted to appear."

SUBMITTED BY: Malcolm Cohen

HISTORY: 26-218   m241  Submitted
         26-218r1 m241  Passed as amended by J3 meeting 241.

----------------------------------------------------------------------

----------------------------------------------------------------------

NUMBER: F23/029
TITLE: Can a variable of type NOTIFY_TYPE be a pointer?
KEYWORDS: NOTIFY_TYPE, POINTER
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
REFERENCES: 24-007

QUESTION:

A named variable of type NOTIFY_TYPE cannot be a pointer, as it is
required to be a coarray (C854 says pointers cannot be coarrays).

However, a component of type NOTIFY_TYPE is apparently permitted to be
a pointer. This is problematic, as in:

    TYPE t
        TYPE(notify_type),POINTER :: p
    END TYPE
    TYPE(t) x[*]
    REAL y[*]

    ... assume that x%p becomes associated on the executing image,
    ... whether by allocation or pointer assignment

    y[n,NOTIFY=x%p] = 999

The assignment statement
   "increments the count of the corresponding notify variable on the
    image specified by the image selector"

But there is no corresponding notify variable, because x%p is not a
subobject of X, and therefore is not a coarray. That renders any use
of x%p for synchronisation non-conforming.

And that renders NOTIFY_TYPE pointer components useless, quite apart
from the inconsistency with not allowing them for named variables of
type NOTIFY_TYPE.

Another problematic case is:

    TYPE t
        TYPE(notify_type),POINTER :: p
    END TYPE
    TYPE(t) x
    TYPE(notify_type) :: z[*]
    REAL y[*]
    x%p => z

    y[n,NOTIFY=x%p] = 999

Is it the corresponding variable Z?

Are either of these examples supposed to be conforming?

ANSWER:

Yes, the first example should be conforming, but the second example
should not be conforming.

Edits are supplied to correct the situation.

EDIT to 24-007.

[145:10+] 9.6 Image selectors, after C934 "TEAM and TEAM_NUMBER...",
          insert new constraint:
   "C933a In a NOTIFY= image-selector-spec, the notify-variable shall
          be a coarray or a structure-component where one part-ref has
          a part-name that is a coarray."

[145:25-27] Same subclause, p4 "Execution of an assignment...",
            change "corresponding notify" to "indicated notify",
            after "specified by the image selector"
            end the sentence (before the ", and"),
            insert new sentence at that point
               "The indicated notify variable is the one that would be
                designated by a coindexed reference with an image
                selector applied to the coarray notify-variable, or to
                the part-ref of the notify-variable whose part-name is
                a coarray; where the image selector specifies the same
                image as the image selector on the variable.",
            and change the ", and" after it to "The statement".

            This makes the whole paragraph read:
   "Execution of an assignment statement whose variable has a NOTIFY=
    specifier atomically increments the count of the indicated notify
    variable on the image specified by the image selector. The
    indicated notify variable is the one that would be designated by a
    coindexed reference with an image selector applied to the coarray
    notify-variable, or to the part-ref of the notify-variable whose
    part-name is a coarray; where the image selector specifies the
    same image as the image selector on the variable. The statement
    does not wait for that image to execute a corresponding NOTIFY
    WAIT statement."

SUBMITTED BY: Malcolm Cohen

HISTORY: 26-219   m241  Submitted
         26-219r1 m241  Passed as amended by J3 meeting 241.

----------------------------------------------------------------------

----------------------------------------------------------------------

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-224   m241  Submitted
         26-224   m241  Passed by J3 meeting 241.

----------------------------------------------------------------------
