Mod Operator

Divides two numbers and returns the remainder.

Syntax

dividend Mod divisor

Parts

dividend
Required numeric expression
divisor
Required numeric expression

Remarks

The result has the same sign as the divisor. The similar Rem operator differs by taking the sign of the dividend instead. One way to remember this is that there is an "o" in both "Mod" and "divisor".

Examples

See also