bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ast-users] Arithmetic assignment side-effects


From: Chet Ramey
Subject: Re: [ast-users] Arithmetic assignment side-effects
Date: Tue, 06 Aug 2013 14:51:09 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

On 8/6/13 5:21 AM, Dan Douglas wrote:
> On Tuesday, August 06, 2013 09:20:38 AM Andreas Schwab wrote:
>> DJ Mills <danielmills1@gmail.com> writes:
>>
>>> I still don't see that;
>>
>> Go strictly from left to right.
> 
> How do you assign something that hasn't been evaluated yet? Evaluating the 
> expression on the RHS is an absolute prerequisite to evaluating the 
> assignment 
> itself. (x += x) = 1 is nonsense. It evaluates to 0 = 1.

I think you're talking past each other.  Andreas is talking about
evaluating the expression on the RHS from left to right.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]