MOD

Use the MOD script function to return the remainder of a division.

Syntax

MOD (Operand1, Operand2)

Parameters

Parameter Description Format
Operand1 First expression. script literal, script variable or number specified without quotation marks
Operand2

Second expression.

Important: This expression must not be zero.

script literal, script variable or number specified without quotation marks

Return Codes

The MOD function returns the remainder of the division.

Examples

In the following example, the function returns the result 1:

:SET &rest# = MOD(10,3)

In the following example, the function returns the result 10:

:SET &rest# = MOD(10,44)

See also: