Language Guide
CHAPTER 6
Expressions
Operations 177
Concatenation 6
The concatenation operator (&) can handle operands of any class.
STRING
The concatenation of two strings is a string that begins with the characters in
the string to the left of the operator, followed immediately by the characters
in the string to the right of the operator. AppleScript does not add spaces or
other characters between the two strings. For example,
"dump" & "truck"
returns the string "dumptruck".
If the operand to the left of the operator is a string, but the operand to the right
is not, AppleScript attempts to coerce the operand to the right to a string. For
example, when AppleScript evaluates the expression
"Route " & 66
it coerces the integer 66 to the string "66", and the result is
"Route 66"
RECORD
The concatenation of two records is a record that begins with the properties
of the record to the left of the operator, followed by the properties of the record
to the right of the operator. If both records contain properties with the same
name, the value of the property from the record to the left of the operator
appears in the result. For example, the result of the expression
{ name:"Eric", mileage:"8000" } &
{ name:"Mitch", framesize:58 }
is
{ name:"Eric", mileage:"8000", frameSize:58 }