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
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).
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).
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
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_DOT, and so on.
The following sections describe functions for manipulating formats and the data in fields represented by formats.
|• Constructing and Verifying Formats:|
|• Format Utility Functions:|
|• Obtaining Properties of Format Types:|
|• Numeric Formatting Styles:|
|• Formatted Data Input and Output:|