&= Operator

Concatenates the value of an expression to the value of a variable, then assigns the result to the variable.

Syntax

variable &= expression

Parts

variable
Required string variable
expression
Required expression of a string type or that can be converted to a string

Remarks

The following two statements are functionally equivalent.

variable &= expression
variable = variable & expression

Examples

Listing 1
x$ = "Hello"
x$ &= " world"
After execution
variablevalue
x$"Hello world"

See also