*= Operator

Multiplies the value of a variable by the value of an expression, then changes the variable to the result.

Syntax

variable *= expression

Parts

variable
A numeric variable or property.
expression
A numeric expression.

Instructions

The two statements that follow operate the same.

variable *= expression
variable = variable * expression

The element on the left side of *= can be a scalar variable, a property, or an element of an array. A property cannot have the modifier @ReadOnly.

*= multiplies the value on its right side by the variable or property on its left side. Then it changes the variable or property on its left side to the result.

Examples

x = 21
x *= 2
After run
variablevalue
x42

See also