Description:
Used to sum two numbers.
Syntax:
result = expression1 + expression2
Note:
Although you can also use the + operator to concatenate two character strings, you should use the
Concatenation (&) operator for concatenation to eliminate ambiguity and provide self-documenting script. When you use the + operator, you may not be able to determine whether addition or string concatenation will occur. The underlying type of the expressions specifies the behavior of the + operator as follows:
- if both expressions are numeric, then addition.
- if both expressions are strings, then Concatenate.
- if one expression is numeric and the other is a string, then Add.