Since you're using x twice, as both input and output each time, in one expression, you'd have to carefully look at the evaluation order rules to see if it is a bug. I would not be surprised by either answer.
On Wed, Apr 1, 2015 at 6:38 PM, Mike Stay <[email protected]> wrote: > I'd have thought that > x^=y^=x^=y; > had the same meaning as > x = x ^ y; > y = y ^ x; > x = x ^ y; > but when x is 1 and y is 2, in v8, spidermonkey, and rhino the short > statement above sets x to 0 while the statements below set x to 2. > What's actually happening? > -- > Mike Stay - [email protected] > http://www.cs.auckland.ac.nz/~mike > http://reperiendi.wordpress.com > > -- > > --- > You received this message because you are subscribed to the Google Groups > "Google Caja Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Cheers, --MarkM -- --- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
