Personal tools
You are here: Home Documentation Users Guide 7. Handing String Data Symbols 7.3 SYMBOL COMMANDS
Document Actions

7.3 SYMBOL COMMANDS

The following are the relevant commands:

DEFINE SYMBOL

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



Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: