[J3] Question about the conditional expression syntax in 21-157r2

Robert Corbett rpcorbett at att.net
Thu Jul 1 00:45:30 UTC 2021


> On Jun 30, 2021, at 5:08 PM, Van Snyder via J3 <j3 at mailman.j3-fortran.org> wrote:
> 
> 
>> 
>> On Thu, 2021-07-01 at 05:53 +0900, Malcolm Cohen via J3 wrote:
>> Hi Milan,
>>  
>> Well, using ordinary parens instead of special parens was what I objected to.
>>  
>> But without any delimiter, there is ambiguity and a greatly increased risk of error.
> 
> I'm traveling, so I knew I couldn't participate in this meeting, so I haven't studied the proposals. So the answers might be obvious.
> 
> Are parentheses required to avoid ambiguity if a conditional expression is the entirety of an expression, such as
> 1. An actual argument?
> 2. The RHS of an assignment statement?
> 3. The <expr> in a IF statement?
> 4. Can a conditional form produce a variable, or only a value? Especially as an actual argument?
As for question 4, the answer is
that conditional expressions
produce values (not variables,
not pointers, not arguments),
and conditional argument
produce arguments (which
can be or must be variables
if the context allows and/or
requires variables).

I argued for conditional expressions
that produce variables, pointers and
pointer variables in subgroup.
No one else supported my proposal
and some people strongly opposed it.
I wanted conditional expressions
badly enough that I was willing to
take what I could get.  The
additional capabilities I wanted
would be nice to have, but they
are not essential.  I did not let what
I perceived as the best realization
of conditional expressions prevent
me from supporting an adequate
formulation of conditional
expressions.  I am happy with
what we passed.

Bob Corbett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210630/7fdb7b39/attachment-0001.htm>


More information about the J3 mailing list