Occasionally it is useful to classify variables into dictionary
classes based on their names. Dictionary classes are represented by
enum dict_class. This type and other declarations for dictionary
classes are in the <data/dict-class.h> header.
The dictionary classes are:
- An ordinary variable, one whose name does not begin with `$' or `#'.
- A system variable, one whose name begins with `$'. See System Variables.
- A scratch variable, one whose name begins with `#'. See Scratch Variables.
The values for dictionary classes are bitwise disjoint, which allows them to be used in bit-masks. An extra enumeration constant
DC_ALL, whose value is the bitwise-or of all of the above constants, is provided to aid in this purpose.
One example use of dictionary classes arises in connection with PSPP
syntax that uses a
TO b to name the variables in a
dictionary from a to b (see Sets of Variables). This syntax requires a and b to be in
the same dictionary class. It limits the variables that it includes
to those in that dictionary class.
The following functions relate to dictionary classes.
Returns the “dictionary class” for the given variable name, by looking at its first letter.