if (!strcasecmp (names[i], "ROWTYPE_"))
dict_create_var_assert (dict, "ROWTYPE_", 8);
else
- dict_create_var_assert (dict, names[i], 0);
+ {
+ struct variable *var = dict_create_var_assert (dict, names[i], 0);
+ var_set_measure (var, MEASURE_SCALE);
+ }
for (size_t i = 0; i < n_names; ++i)
free (names[i]);
}
*tv = true;
+ var_set_measure (v, MEASURE_NOMINAL);
var_set_both_formats (v, &(struct fmt_spec) { .type = FMT_F, .w = 4 });
}
return true;
mf.svars = xmalloc (sizeof *mf.svars);
mf.svars[0] = dict_create_var_assert (dict, lex_tokcstr (lexer),
0);
+ var_set_measure (mf.svars[0], MEASURE_NOMINAL);
var_set_both_formats (
mf.svars[0], &(struct fmt_spec) { .type = FMT_F, .w = 4 });
mf.n_svars = 1;
else if (lex_match_id (lexer, "CELLS"))
{
if (mf.input_rowtype)
- msg (SW, _("CELLS is ignored when VARIABLES includes ROWTYPE_"));
+ lex_next_msg (lexer, SW,
+ -1, -1, _("CELLS is ignored when VARIABLES "
+ "includes ROWTYPE_"));
lex_match (lexer, T_EQUALS);
if (open || in_parens || (lex_token (lexer) != T_ENDCMD
&& lex_token (lexer) != T_SLASH))
{
- lex_error (lexer, _("Row type keyword expected."));
+ const char *rowtypes[] = {
+#define RT(NAME, DIMS) #NAME,
+ ROWTYPES
+#undef RT
+ "N_VECTOR", "SD",
+ };
+ lex_error_expecting_array (
+ lexer, rowtypes, sizeof rowtypes / sizeof *rowtypes);
goto error;
}
break;