-/* Returns true if VAR_TYPE is a valid variable type. */
-bool
-var_type_is_valid (enum var_type var_type)
-{
- return var_type == NUMERIC || var_type == ALPHA;
-}
-
-/* Returns an adjective describing the given variable TYPE,
- suitable for use in phrases like "numeric variable". */
-const char *
-var_type_adj (enum var_type type)
-{
- return type == NUMERIC ? _("numeric") : _("string");
-}
-
-/* Returns a noun describing a value of the given variable TYPE,
- suitable for use in phrases like "a number". */
-const char *
-var_type_noun (enum var_type type)
-{
- return type == NUMERIC ? _("number") : _("string");
-}
-\f
-/* Returns true if M is a valid variable measurement level,
- false otherwise. */
-bool
-measure_is_valid (enum measure m)
-{
- return m == MEASURE_NOMINAL || m == MEASURE_ORDINAL || m == MEASURE_SCALE;
-}
-
-/* Returns true if A is a valid alignment,
- false otherwise. */
-bool
-alignment_is_valid (enum alignment a)
-{
- return a == ALIGN_LEFT || a == ALIGN_RIGHT || a == ALIGN_CENTRE;
-}
+/* A variable. */
+struct variable
+ {
+ /* Dictionary information. */
+ char name[VAR_NAME_LEN + 1]; /* Variable name. Mixed case. */
+ int width; /* 0 for numeric, otherwise string width. */
+ struct missing_values miss; /* Missing values. */
+ struct fmt_spec print; /* Default format for PRINT. */
+ struct fmt_spec write; /* Default format for WRITE. */
+ struct val_labs *val_labs; /* Value labels. */
+ char *label; /* Variable label. */
+
+ /* GUI information. */
+ enum measure measure; /* Nominal, ordinal, or continuous. */
+ int display_width; /* Width of data editor column. */
+ enum alignment alignment; /* Alignment of data in GUI. */
+
+ /* Case information. */
+ bool leave; /* Leave value from case to case? */
+
+ /* Data for use by containing dictionary. */
+ struct vardict_info *vardict;
+
+ /* Used only for system and portable file input and output.
+ See short-names.h. */
+ char **short_names;
+ size_t short_name_cnt;
+
+ /* Each command may use these fields as needed. */
+ void *aux;
+ void (*aux_dtor) (struct variable *);
+
+ /* Values of a categorical variable. Procedures need
+ vectors with binary entries, so any variable of type ALPHA will
+ have its values stored here. */
+ struct cat_vals *obs_vals;
+
+ /* Custom attributes. */
+ struct attrset attributes;
+ };