Next: Input and Output Formats, Up: Basic Concepts [Contents][Index]
The unit of data in PSPP is a value.
Values are classified by type and width. The
type of a value is either numeric or string (sometimes
called alphanumeric). The width of a string value ranges from 1 to
MAX_STRING bytes. The width of a numeric value is artificially
defined to be 0; thus, the type of a value can be inferred from its
width.
Some support is provided for working with value types and widths, in data/val-type.h:
Maximum width of a string value, in bytes, currently 32,767.
Returns true if val_type is a valid value type, that is,
either VAL_NUMERIC or VAL_STRING. Useful for
assertions.
Returns VAL_NUMERIC if width is 0 and thus represents the
width of a numeric value, otherwise VAL_STRING to indicate that
width is the width of a string value.
The following subsections describe how values of each type are represented.
| • Numeric Values | ||
| • String Values | ||
| • Runtime Typed Values |