8.8.5 Mod operator (remainder calculation) (find the division remainder of two numbers)
- Purpose
-
Divides one number by another and returns the remainder.
- Syntax
Result = Number1 Mod Number2
- Arguments
-
- Result
-
Specify a variable for storing the division remainder.
- Number1
-
Write any numerical expression.
- Number2
-
Write any numerical expression.
- Description
-
The Mod operator divides Number1 by Number2, and returns the remainder as the result.
Expressions with Empty values are handled as zero.
- Note
-
When Result and Number1 are the same variable, you can use the Mod= operator instead.
- Example
' This code stores 5 in variable result1. result1 = 19 Mod 7
- JP1/Script version
-
Supported from JP1/Script 01-00.