Mod= Operator

Divides the value of a variable by the value of an expression, then changes the variable to the remainder.

Syntax

variable Mod= expression

Parts

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

Instructions

The two statements that follow operate the same.

variable Mod= expression
variable = variable Mod expression

Because Mod= comes from Mod, the sign of the variable (positive or negative) does not change.

Data types

TODO

Division by zero

TODO

Examples

Example 1

x = 42
x Mod= 10
y = 24
y Mod= -10
After execution
variablevalue
x2
y-4

See also