Concatenation Operator

Definition

The concatenation operator (+) combines two strings or two lists.

Operand Type

Both operands must be strings or lists.

Result Type

The operator returns a string or list that consists of the first operand followed by the second.

Example

[ ] // string concatenation
[ ] STRING sFirstName = "Bullwinkle"
[ ] STRING sLastName = "Moose"
[ ] // " " writes a space
[ ] STRING sFullName = sFirstName + " " +sLastName
[ ] 
[ ] 
[ ] // Prints: Bullwinkle Moose
[ ] Print (sFullName)
[ ] 
[ ] 
[ ] // list concatenation
[-] LIST lsMelon = {...}
	[ ] "watermelon"
	[ ] "cantaloupe" 
[ ] 
[-] LIST lsBerry = {...}
	[ ] "strawberry"
	[ ] "raspberry"  
[ ] 
[ ] LIST lsFruit = lsMelon + lsBerry
[ ] Print (lsFruit)
[ ] 
[ ] 
[ ] // Prints:
[ ] // {watermelon, cantaloupe, strawberry, raspberry}