The following are the relevant commands:
DEFINE SYMBOL symbol_name = string
SHOW SYMBOL symbol_name
SHOW SYMBOL partial_name
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.
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