String variables and literals can produce a new string by concatenation, using plus ("+") clause.
Concatenation in this manner can be used in any statement where a string is expected.
Note that you can concatenate binary strings too, i.e. strings that do not end with a null character, with each binary string used in its true length. The result will in general be a binary string.
Examples
For instance, here we'll concatenate two string constants and a variable "var":
set-string var = "day" set-string newstr = "nice " + var + " it is!" p-out newstr new-line
Copied!
The result will be "nice day it is!".
In the following case, directory (variable "dir") is concatenated with a forward slash ("/") and then file name (variable "file") to produce full path of a file to read: