Mod

Mod is a built-in scripting function that gets the remainder from a division operation.

Function Group Execution Windows Embedded Thin Client Mobile Access
Mod Arithmetic Synchronous Supported Supported Supported Supported

Syntax

  Mod( numNumerator, numDenominator )  
numNumerator
Integer or Real tag containing the Numerator of the function.
numDenominator
Integer or Real tag containing the Denominator of the function.

Returned value

Returns the remainder (as a real number) after dividing numNumerator by numDenominator.

Tip: Use the Div function to get the whole number dividend of the operation.

Examples

Tag Name Expression
Tag Mod( 50, 4 ) // Returned value = 2
Tag Mod( 16, 4 ) // Returned value = 0
Tag Mod( 100, 8.2 ) // Returned value = 1.600

Mod