LOTUSSCRIPT LANGUAGE
Syntax
numExpr1 + numExpr2
Elements
numExpr1, numExpr2
When adding expressions of numeric data types, the result is a value whose data type in most cases is 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 Double and the other is an Integer, then the data type of the result is Double.
The exceptions are:
LotusScript interprets the + operator as either addition or string concatenation, depending on the data types of expr1 and expr2. The following table lists these interpretations. The numeric data types are Integer, Long, Single, Double, Currency, and (in a Variant variable only) Date/Time.
Language cross-reference
@Sum function in formula language
Example
Dim a As Variant Dim b As Integer a = "8" b% = 7
' Use operator for addition. Print 8 + 7 ' Prints 15 Print a + 7 ' Prints 15 Print 8 + b% ' Prints 15 Print a + b% ' Prints 15
' Use operator for string concatenation. Print "Hello " + "there" ' Prints "Hello there" Print a + "7" ' Prints "87"
See Also