*= 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
Necessary numeric variable
expression
Necessary numeric expression

Instructions

The two statements that follow operate the same.

variable *= expression
variable = variable * expression

Examples

Example 1

x = 21
x *= 2
After execution
variablevalue
x42

See also