String Operations
String variables can be concatenated using the + operator. The syntax is:
C$ = A$ + B$
Concatenation can also include constant strings:
total$ = "A$ is " + A$ + " and B$ is " + B$
The string functions can be used in a defining command such as
this$ = "Here is the lens title: " + $LENSNAME()
String variables are printed just like other strings:
PRINT "Here is A$: ", A$
Note that the PRINT function can only print single string variables; there is no support for the concatenation operand or string functions inside print commands. The correct procedure is to concatenate the strings into a new string and then print the new string:
A$ = B$ + C$ PRINT A$
Alternatively, the comma acts as a concatenation operand:
PRINT A$, B$, C$
String functions cannot be printed directly like this:
PRINT $LENSNAME() ! NOT CORRECT !!!
Instead, the correct procedure is to assign the function result to a variable and then print the variable:
Z$ = $LENSNAME() PRINT Z$
Next: