Next: User-Missing Values, Previous: Values, Up: Basic Concepts [Contents][Index]
Input and output formats specify how to convert data fields to and
from data values (see Input and Output Formats in PSPP Users
Guide). PSPP uses struct fmt_spec
to represent input and output
formats.
Function prototypes and other declarations related to formats are in the <data/format.h> header.
An input or output format, with the following members:
enum fmt_type type
The format type (see below).
int w
Field width, in bytes. The width of numeric fields is always between 1 and 40 bytes, and the width of string fields is always between 1 and 65534 bytes. However, many individual types of formats place stricter limits on field width (see fmt_max_input_width, fmt_max_output_width).
int d
Number of decimal places, in character positions. For format types
that do not allow decimal places to be specified, this value must be
0. Format types that do allow decimal places have type-specific and
often width-specific restrictions on d
(see
fmt_max_input_decimals, fmt_max_output_decimals).
An enumerated type representing an input or output format type. Each
PSPP input and output format has a corresponding enumeration constant
prefixed by ‘FMT’: FMT_F
, FMT_COMMA
,
FMT_DOT
, and so on.
The following sections describe functions for manipulating formats and the data in fields represented by formats.
Next: User-Missing Values, Previous: Values, Up: Basic Concepts [Contents][Index]