Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Assignment Operator (=)

Assigns a value to a variable.

result = expression

Arguments

result
Any variable.
expression
Any expression.

Remarks

The = operator returns the value of expression and assigns that value into variable. This means that you can chain assignment operators as follows:

j = k = l = 0;

j, k, and l equal zero after the example statement is executed.

The data type of expression must be coercible to the data type of result.

Requirements

Version 1

See Also

Operator Precedence | Operator Summary

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.