"Operator Precedence", Compound Operators

Features wanted...
Post Reply
PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

"Operator Precedence", Compound Operators

Post by PeterH »

For Compound Operators your interpretation and realization is different from mine.
=> I'd expect the added operand of these Operators "as an addition to the '='", so that this operand is to execute very last, together with the '='.
That is: $a *= expression; should always be $a = $a * (expression);
=> This also means that Operator Precedence for all Compound Operators would be at last, together with '='.

I never used such a combination - so I never noticed the current implementation.
(Though I "always" use especially .= :tup: )

=> What do others think about it?
=> anyone used a combi like $a *= 3 + 4; ?
it is $a = ($a * 3) + 4;
I'd expect $a = $a * (3 + 4);
W7(x64) SP1 German
( +WXP SP3 )

Post Reply