Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.8.6 Mod= operator (remainder calculation) (assign to a variable the division remainder of a variable and an expression)

Purpose

Divides a variable by an expression, and assigns the remainder to the variable.

Syntax
Result Mod= Number
Arguments
Result

Specify a variable for storing the division remainder.

Number

Write any numerical expression.

Description

The Mod= operator divides the value of the variable Result by the value of the numerical expression Number, and assigns the remainder to Result.

Empty values are handled as zero. If Result is an Empty value or undefined, 0 is assigned to Result. If Number is an Empty value, an execution error occurs because this would be division by zero.

Example
' This code stores 5 in variable result1.
result1 = 19
result1 Mod= 7
JP1/Script version

Supported from JP1/Script 06-51.