String concatenation
The concatenation operators combine two strings to form one string by appending the second string to the right-hand
end of the first string. The concatenation might occur with or without
an intervening blank. The concatenation operators are:
- (blank)
- Concatenate terms with one blank in between
- ||
- Concatenate without an intervening blank
- (abuttal)
- Concatenate without an intervening blank
You can force concatenation without a blank by using the || operator.
The abuttal operator is assumed between two terms that are not separated by another operator. This can occur when two terms are syntactically distinct, such as a literal string and a symbol, or when they are separated only by a comment.
Examples:
An example of syntactically distinct
terms is: if Fred has the value 37.4, then Fred'%' evaluates to 37.4%.
If the variable PETER has the value 1, then (Fred)(Peter) evaluates to 37.41.
In EBCDIC, the two adjoining strings, one hexadecimal
and one literal,
'c1 c2'x'CDE' evaluate to ABCDE.In the case of:
Fred/* The NOT operator precedes Peter. */¬Peter there is no abuttal operator implied, and the expression is not
valid. However, (Fred)/* The NOT operator precedes Peter. */(¬Peter) results in an abuttal, and evaluates to 37.40.