Compound assignment

Read(3437) Label: computation, assignment,

Description:

The value of a variable will undergo a certain computation with an expression to assign a new value to the variable.

Syntax:

a?=x 

Note:

A variable value will undergo a certain computation with an expression to assign a new value to the variable.

Parameter:

a

Variable name

x

Legal expression

?

An operator, which can be +, -, *, /, \, and %

Return value:

New variable

Example:

 

A

 

1

=a=7

 

2

=a-=4

3