Used to sum two numbers.
result = expression1 + expression2
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 in the following way:
- 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.