Vanguard Software
Forecasting & Planning Solutions

contents.gifindex.gifprev1.gifnext1.gif

Compound Assignment

Format: x ^= y
x
*= y
x
/= y
x
%= y
x
+= y
x
-= y
x
<<= y
x
>>= y
x
>>>= y
x
&= y
x
~= y
x
|= y

Arguments: (node) x Name of an existing node, variable, object property, or list element

[any] y Any valid expression

Returns: [any] The value of x after performing the requested operation

Description: Compound assignment operators are used to perform one of the basic arithmetic operations and assign the result to a node. For example, x+=y is identical to x=x+y. Similarly, x-=y is the same as x=x-y.

Examples: var x=3; = x = 3

x+=2 = x = 5

See Also: Power, Multiply, Divide, Remainder, Add, Subtract, Left Shift, Right Shift, Zero-Fill Right Shift, Bitwise And, Bitwise Exclusive Or, Bitwise Or

  Forecasting Software  |  Strategic Planning Software  |  Decision Support Software
Decision Tree Software  |  Monte Carlo Simulation Software  |  Risk Analysis Software
Portfolio Analysis  |  Expert System Software  |  Employee Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2009 Vanguard Software Corporation
Home Products Solutions Services Customers Partners Company
Vanguard
Applying science to business management
Vanguard
Print this page   Email this page to a friend