if (!save->expression)
goto error;
+ int names_start = 0;
+ int names_end = 0;
while (lex_match (s->lexer, T_SLASH))
{
if (lex_match_id (s->lexer, "OUTFILE"))
{
lex_match (s->lexer, T_EQUALS);
matrix_expr_destroy (names);
+ names_start = lex_ofs (s->lexer);
names = matrix_parse_exp (s);
+ names_end = lex_ofs (s->lexer) - 1;
if (!names)
goto error;
}
if (variables.n && names)
{
- msg (SW, _("VARIABLES and NAMES both specified; ignoring NAMES."));
+ lex_ofs_msg (s->lexer, SW, names_start, names_end,
+ _("Ignoring NAMES because VARIABLES was also specified."));
matrix_expr_destroy (names);
names = NULL;
}
7 | SAVE 1.
| ^~~~~~~
-matrix.sps:8: warning: SAVE: VARIABLES and NAMES both specified; ignoring
-NAMES.
+matrix.sps:8.35-8.39: warning: SAVE: Ignoring NAMES because VARIABLES was also
+specified.
+ 8 | SAVE 1/OUTFILE='matrix.sav'/NAMES={'a'}/VARIABLES=a.
+ | ^~~~~
matrix.sps:10: error: MATRIX: Cannot save 1×2 matrix to `matrix2.sav' because
the first SAVE to `matrix2.sav' in this matrix program wrote a 1-column matrix.