MOD

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

Syntax

MOD (Operand1, Operand2)

Parameters

  • MOD
    Returns the remainder of the division of Operand1by Operand2
    Return code: remainder of the division

  • Operand1
    First expression
    Format: script literal, script variable or number specified without quotation marks

  • Operand2
    Second expression
    Must not be zero
    Format: script literal, script variable or number specified without quotation marks

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: