[J3] Why is += missing?

Jeff Hammond jehammond at nvidia.com
Mon Sep 6 08:35:54 UTC 2021


I would hope that the definition of the second expression would not require any special attention.  At least in C and C++, there is clear text on sequence points in expressions.  I guess I need to read the whole spec end-to-end a few times to get a handle on this.

Jeff

From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of Thomas König via J3 <j3 at mailman.j3-fortran.org>
Date: Friday, September 3, 2021 at 7:33 PM
To: j3 at mailman.j3-fortran.org <j3 at mailman.j3-fortran.org>
Cc: Thomas König <tk at tkoenig.net>
Subject: Re: [J3] Why is += missing?
External email: Use caution opening links or attachments


On 02.09.21 09:10, Malcolm Cohen via J3 wrote:
> As Van said, the alternatives to op= are trivial.

Assume that f is a function that returns a value depending
on the number of its invocations, then

   a(f(i)) = a(f(i)) + b

could mean something different than

   a(f(i)) += b

or not. Either way, it would have to be defined what happens.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210906/9371bdc4/attachment.htm>


More information about the J3 mailing list