From: Ben Pfaff Date: Mon, 17 Feb 2025 17:39:54 +0000 (-0800) Subject: Fix order of variables in error message. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f8276c365274b6c303a4fc98d2667cd2d1c5560;p=pspp Fix order of variables in error message. Thanks to Frans Houweling for reporting the bug. --- diff --git a/src/language/lexer/variable-parser.c b/src/language/lexer/variable-parser.c index 2977c2fb76..1a71065aea 100644 --- a/src/language/lexer/variable-parser.c +++ b/src/language/lexer/variable-parser.c @@ -355,7 +355,7 @@ parse_var_set_vars (struct lexer *lexer, const struct var_set *vs, const char *last_name = var_get_name (last_var); lex_ofs_error (lexer, start_ofs, end_ofs, _("%s TO %s is not valid syntax since %s " - "precedes %s in the dictionary."), + "is after %s in the dictionary."), first_name, last_name, first_name, last_name); goto fail; } @@ -867,7 +867,7 @@ var_syntax_evaluate (struct lexer *lexer, { lex_ofs_error (lexer, first_ofs, last_ofs, _("%s TO %s is not valid syntax since %s " - "precedes %s in the dictionary."), + "is after %s in the dictionary."), vs[i].first, vs[i].last, vs[i].first, vs[i].last); goto error; diff --git a/tests/language/commands/matrix.at b/tests/language/commands/matrix.at index 219394af70..91222ad8bc 100644 --- a/tests/language/commands/matrix.at +++ b/tests/language/commands/matrix.at @@ -3998,8 +3998,8 @@ matrix.sps:22.17: error: MATRIX: x is not a variable name. 22 | GET x/VARIABLES=x. | ^ -matrix.sps:23.17-23.22: error: MATRIX: c TO a is not valid syntax since c -precedes a in the dictionary. +matrix.sps:23.17-23.22: error: MATRIX: c TO a is not valid syntax since c is +after a in the dictionary. 23 | GET x/VARIABLES=c TO a. | ^~~~~~