Home / lang / mod 
MOD
Syntax
iRemainder = iNumerator AS Integer MOD iDenominator AS Integer

Calculates the remainder of the quotient of two numbers.

This operator does not evaluate the true mathematic modulo:

A MOD B = A - (A DIV B) * B

Example
PRINT 9 MOD 4, -9 MOD 4, 9 MOD -4, -9 MOD -4

1 -1 1 -1


See also
Arithmetic Operators  DIV