From: Ben Pfaff Date: Tue, 12 Apr 2011 05:49:01 +0000 (-0700) Subject: FORMATS: Allow an optional slash before each set of variable names. X-Git-Tag: v0.7.8~73 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9df2afdd4fb29138d9a1885cd892ea16528a71f3;p=pspp-builds.git FORMATS: Allow an optional slash before each set of variable names. This increases compatibility. --- diff --git a/src/language/dictionary/formats.c b/src/language/dictionary/formats.c index 718344ac..2244ef77 100644 --- a/src/language/dictionary/formats.c +++ b/src/language/dictionary/formats.c @@ -73,6 +73,8 @@ internal_cmd_formats (struct lexer *lexer, struct dataset *ds, int which) int width; size_t i; + lex_match (lexer, T_SLASH); + if (lex_token (lexer) == T_ENDCMD) break; diff --git a/tests/language/dictionary/formats.at b/tests/language/dictionary/formats.at index 4bdf089f..d3c2e65e 100644 --- a/tests/language/dictionary/formats.at +++ b/tests/language/dictionary/formats.at @@ -4,9 +4,9 @@ AT_SETUP([FORMATS positive tests]) AT_DATA([formats.sps], [dnl DATA LIST LIST /a b c * x (A1) y (A2) z (A3). DISPLAY VARIABLES. -FORMATS a (COMMA10) b (N4). +FORMATS /a (COMMA10) b (N4). DISPLAY VARIABLES. -FORMATS c (E8.1) x (A1) y (AHEX4) z (A3). +FORMATS c (E8.1) x (A1) /y (AHEX4) z (A3). DISPLAY VARIABLES. ]) AT_CHECK([pspp -o pspp.csv formats.sps])