Mod Operator

Divides two numbers and returns the remainder.

Syntax

expression_1 Mod expression_2

Parts

expression_1
A numeric expression.
expression_2
A numeric expression.

Instructions

The result has the same sign as the first expression. The similar Rem operator differs by taking the sign of the second expression instead. One way to remember this is that the “M” in “Mod” is nearer to the first expression.

Data types

TODO

Attempted division by zero

TODO

Examples

TODO

See also