Operator (+)
<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > Operators > String > Operator (+) |
Description
Used to concatenate two strings.
Syntax
result = expression1 + expression2
The + operator syntax has these parts:
Part | Description |
result | Any string variable. |
expression1 | Any expression (string or numeric). |
expression2 | Any expression (string or numeric). |
Returns
N/A
Remarks
Although you can also use the + operator to concatenate two character strings, you should use the & operator for concatenation to eliminate ambiguity and provide self-documenting code.
Restrictions
See also
Examples
DIM MyString AS STRING
'Results will be the string '123'
MyString = 1 + 2 + 3
MyString = 1 & 2 & 3