7.3 SYMBOL COMMANDS
The following are the relevant commands:
usage:
DEFINE SYMBOL symbol_name = string
SHOW SYMBOL
usage:
SHOW SYMBOL/ALL
SHOW SYMBOL symbol_name
SHOW SYMBOL partial_name
CANCEL SYMBOL
usage:
CANCEL SYMBOL/ALL
CANCEL SYMBOL symbol_name
Legal symbol names must begin with a letter and contain only letters, digits, underscores, and dollar signs.
To invoke symbol substitution—the replacement of the symbol name with its (text) value—within a Ferret command include the name of the symbol preceded by a dollar sign in parentheses.
For example,
yes? DEFINE SYMBOL hi = hello everyone
yes? MESSAGE ($hi) ! issues "hello everyone" msg
It is also possible to nest symbol definitions, as the following commands illustrate:
yes? DEFINE SYMBOL label_2 = My test label
yes? DEFINE SYMBOL number = 2
yes? SAY ($label_($number))
My test label