Subtraction operator (LotusScript® Language)
Finds the difference between two numbers.
Syntax
numExpr1 - numExpr2
Elements
numExpr1, numExpr2
Any numeric constant, variable, or expression; or any function that returns a number. An EMPTY operand is considered a 0.
Return value
The result is a value whose data type is generally the same as that of the operand whose data type is latest in this ordering: Integer, Long, Single, Double, Currency. For example, if one operand is a Long and the other is a Currency, then the data type of the result is Currency.
The exceptions are:
- When the result is a Variant of Integer that overflows its legal range, the result is converted to a Variant of Long.
- When the result is a Variant of Long, Single, or Date/Time that overflows its legal range, the result is converted to a Variant of Double.
- If numExpr1 and numExpr2 are both EMPTY, the result has Integer.
- If either or both operands are NULL expressions, the result is a NULL.
- If numExpr1 and numExpr2 are both Variants of date/time
values, the result is a Variant of Double.
Example
Print 5 - 3.4 ' Prints 1.6