Loading...
Select Version
The MOD function returns an integer value that is argument-1 modulo argument-2.The type of this function is integer.
Format
FUNCTION
MOD
(argument-1 argument-2)
Arguments
argument-1 and argument-2 must be integers.
The value v of argument-1 must lie in the range
-
1031 < v < 1031If the value of argument-1 is outside this range, the function value can be calculated but is not guaranteed to be correct.
The value of argument-2 must not be 0.
Returned values
The returned value is argument-1 modulo argument-2. The returned value is defined as:
argument-1-
(argument-2 * FUNCTION INTEGER (argument-1 / argument-2))The error default value is
-
9’999’999’999’999’999’999’999’999’999’999.
See also: REM
Example 9-29
argument-1 | argument-2 | Returned value |
11 | 5 | 1 |