VBScript » Operators » +

Version: 1.0

Syntax:
+

The + operator has two uses. It is used to add numbers together. It also may be used to concatenate (combine) strings together.

Note it is usually recommended that only the & operator be used for string concatenation.

Examples

Code:
<% total = 5.678 + 0.234 + 23.1 %>
Output:
29.012
Explanation:

Addition

Language(s): VBScript
Code:
<% cheese=" is made of blue cheese." %>
<% sentence="The moon" + cheese + " Mice like blue cheese." %>
Output:
The moon is made of blue cheese. Mice like blue cheese.
Explanation:

Concatenation

Language(s): VBScript

See Also: