+ switch (cat->type)
+ {
+ case CCT_POSTCOMPUTE:
+ if (!ctables_recursive_check_postcompute (cat->pc->expr, cat,
+ c, cats_location))
+ return false;
+ break;
+
+ case CCT_NUMBER:
+ case CCT_RANGE:
+ for (size_t j = 0; j < n_vars; j++)
+ if (var_is_alpha (vars[j]))
+ {
+ msg_at (SE, cat->location,
+ _("This category specification may be applied "
+ "only to numeric variables, but this "
+ "subcommand tries to apply it to string "
+ "variable %s."),
+ var_get_name (vars[j]));
+ return false;
+ }
+ break;
+
+ case CCT_STRING:
+ if (parse_strings)
+ {
+ union value v;
+ char *error = data_in (cat->string, dict_get_encoding (dict),
+ common_format->type,
+ settings_get_fmt_settings (),
+ &v, 0, NULL);
+ if (error)
+ {
+ msg_at (SE, cat->location,
+ _("Failed to parse category specification as "
+ "format %s: %s."),
+ fmt_name (common_format->type), error);
+ free (error);
+ return false;
+ }
+
+ ss_dealloc (&cat->string);
+
+ cat->type = CCT_NUMBER;
+ cat->number = v.f;
+ }
+ else
+ {
+ for (size_t j = 0; j < n_vars; j++)
+ if (var_is_numeric (vars[j]))
+ {
+ msg_at (SE, cat->location,
+ _("This category specification may be applied "
+ "only to string variables, but this "
+ "subcommand tries to apply it to numeric "
+ "variable %s."),
+ var_get_name (vars[j]));
+ return false;
+ }
+ }
+ break;
+
+ case CCT_MISSING:
+ case CCT_OTHERNM:
+ case CCT_SUBTOTAL:
+ case CCT_TOTAL:
+ case CCT_VALUE:
+ case CCT_LABEL:
+ case CCT_FUNCTION:
+ case CCT_EXCLUDED_MISSING:
+ break;
+ }