8.8.10 /= operator (division) (assign to a variable the quotient of a variable and an expression)
- Purpose
-
Divides a variable by an expression, and assigns the integer part of the quotient to the variable (same as the \= operator).
- Syntax
Result /= Number
- Arguments
-
- Result
-
Specify a variable for storing the quotient.
- Number
-
Write any numerical expression.
- Description
-
The /= operator divides the value of the variable Result by the value of the numerical expression Number, and assigns the quotient 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 2 in variables result1 and result2. Dim result1, result2 result1 = 14 result2 = 19 result1 /= 7 result2 /= 7
- JP1/Script version
-
Supported from JP1/Script 06-51.