bug-bash
[Top][All Lists]
Advanced

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

Re: Arithmetic assignment side-effects


From: Linda Walsh
Subject: Re: Arithmetic assignment side-effects
Date: Sun, 04 Aug 2013 22:44:18 -0700
User-agent: Thunderbird



Dan Douglas wrote:
On Sunday, August 04, 2013 06:08:18 PM Linda Walsh wrote:
From the bash manpage, it would see that += is higher precedence
than assignment, so the increment would be done first, followed
by the attempt at an assignment of 1 to 1.

= and += have equal precedence. Associativity is right to left, as described in operator(7). x=1 occurs first.



Hmm... yeah I see that now...
manpage is a bit confusing having the word assignment
on a line lower than the rest (which includes assignment '=')

Well, that makes me feel better, as 2 looked more intuitive as I said
in the last note..



reply via email to

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