Export (0) Print
Expand All

Mod Operator

Updated: August 2009

Divides two integers and returns the integer remainder.

result = number1 Mod number2

Result

Any numeric variable.

number1

Any numeric expression.

number2

Any numeric expression.

If number1 or number2 are floating point numbers, they are first rounded to integers.

The Mod (modulus) operator divides number1 by number2 and returns the integer remainder.

For example, in the following expression, A equals 5.

A = 19 Mod 7

If any expression is Null, result is also Null. Any expression that is Empty is treated as 0.

Date

History

Reason

August 2009

Modified example and explanation of example.

Customer feedback.

Community Additions

Show:
© 2015 Microsoft