* The GRAPH command now has a /BAR subcommand to draw barcharts.
+ * If the DECIMAL character is set to COMMA then the ',' character
+ will not be treated as a separator by DATA LIST.
+
* The graphical user interface (psppire) has been changed as follows:
- It now uses Gtk+ version 3 instead of version 2. Accordingly, it has a
@end display
In free format, the input data is, by default, structured as a series
-of fields separated by spaces, tabs, commas, or line breaks. Each
+of fields separated by spaces, tabs, or line breaks.
+If the current @subcmd{DECIMAL} separator is @subcmd{DOT} (@pxref{SET}),
+then commas are also treated as field separators.
+Each
field's content may be unquoted, or it may be quoted with a pairs of
apostrophes (@samp{'}) or double quotes (@samp{"}). Unquoted white
space separates fields but is not part of any field. Any mix of
Setting it to @subcmd{COMMA}
causes the decimal point character to be @samp{,} and the grouping
character to be @samp{.}.
+If the setting is @subcmd{COMMA}, then @samp{,} will not be treated
+as a field separator in the @cmd{DATA LIST} command (@pxref{DATA LIST}).
The default value is determined from the system locale.
@item FORMAT
data_parser_set_quotes (parser, ss_cstr ("'\""));
data_parser_set_soft_delimiters (parser,
ss_cstr (CC_SPACES));
- data_parser_set_hard_delimiters (parser, ss_cstr (","));
+ const char decimal = settings_get_decimal_char (FMT_F);
+ data_parser_set_hard_delimiters (parser,
+ ss_buffer (",", (decimal == '.') ? 1 : 0));
}
}
}
f,F1.0
])
AT_CLEANUP
+
+AT_SETUP([DATA LIST Decimal comma])
+AT_DATA([data-list.sps], [dnl
+SET DECIMAL=COMMA.
+
+DATA LIST NOTABLE LIST /A *.
+BEGIN DATA
+1
+2
+3
+3,5
+4
+4,5
+5
+6
+END DATA
+
+LIST /FORMAT=NUMBERED.
+])
+
+AT_CHECK([pspp -O format=csv data-list.sps], [0], [dnl
+Table: Data List
+Case Number,A
+1,"1,00"
+2,"2,00"
+3,"3,00"
+4,"3,50"
+5,"4,00"
+6,"4,50"
+7,"5,00"
+8,"6,00"
+])
+
+AT_CLEANUP