Wherever the name of a string appears in square brackets during [B/D] input, the name of the string is replaced by the string itself. Thus, for example, suppose that we have defined the strings a=xvariable1 and b2=intercept as above. Then the command
BD>print : We are about to print the value of [a] and [b2]
is parsed, and the string names replaced, to obtain the command
BD>print : We are about to print the value of xvariable1 and intercept
Unrecognised quantities in square brackets are not replaced. This thus allows the recursive definition of strings as in the sequence of commands
which would result in a later use of [a] being replaced by the characters `text1text2'. Another use of this feature allows us to store entire command lines as strings. Consider, for example, the following definition:
BD>string :t=print : This is an example!
At a later stage we might issue simply the `command'
BD>[t]
which, after parsing, will become equivalent to
BD>print : This is an example!
Strings may be nested to any depth, limited only by line length. As an example, consider the following code:
This fragment of code should print the text `dog' as .
In the context of inserting strings during the parsing of command lines, strings have lower precedence than all control variable names defined in active FOR: statements. Thus the following legal sequence of commands:
results in the output `i=1' and 'i=2', as the quantity `[i]' is replaced by the value of the control variable rather than the string.
See §1.4.2 for futher details on parsing.