LIST
/VARIABLES=var_list
/CASES=FROM start_index TO end_index BY incr_index
- /FORMAT=@{UNNUMBERED,NUMBERED@} @{WRAP,SINGLE@}
- @{NOWEIGHT,WEIGHT@}
+ /FORMAT=@{UNNUMBERED,NUMBERED@} @{WRAP,SINGLE@}
@end display
The @cmd{LIST} procedure prints the values of specified variables to the
The FORMAT subcommand can be used to change the output format. NUMBERED
will print case numbers along with each case; UNNUMBERED, the default,
causes the case numbers to be omitted. The WRAP and SINGLE settings are
-currently not used. WEIGHT will cause case weights to be printed along
-with variable values; NOWEIGHT, the default, causes case weights to be
-omitted from the output.
+currently not used.
Case numbers start from 1. They are counted after all transformations
have been considered.
*variables=varlist("PV_NO_SCRATCH");
cases=:from n:first,"%s>0"/by n:step,"%s>0"/ *to n:last,"%s>0";
+format=numbering:numbered/!unnumbered,
- wrap:!wrap/single,
- weight:weight/!noweight.
+ wrap:!wrap/single.
*/
/* (declarations) */
/* (functions) */
cmd.step = 1;
}
- /* Weighting variable. */
- if (cmd.weight == LST_WEIGHT)
- {
- if (dict_get_weight (dict) != NULL)
- {
- size_t i;
-
- for (i = 0; i < cmd.n_variables; i++)
- if (cmd.v_variables[i] == dict_get_weight (dict))
- break;
- if (i >= cmd.n_variables)
- {
- /* Add the weight variable to the end of the variable list. */
- cmd.n_variables++;
- cmd.v_variables = xnrealloc (cmd.v_variables, cmd.n_variables,
- sizeof *cmd.v_variables);
- cmd.v_variables[cmd.n_variables - 1]
- = dict_get_weight (dict);
- }
- }
- else
- msg (SW, _("`/FORMAT WEIGHT' specified, but weighting is not on."));
- }
-
/* Case number. */
if (cmd.numbering == LST_NUMBERED)
{
casenum_var = var_create ("Case#", 0);
var_set_both_formats (casenum_var, &format);
- /* Add the weight variable at the beginning of the variable list. */
+ /* Add the case-number variable at the beginning of the variable list. */
cmd.n_variables++;
cmd.v_variables = xnrealloc (cmd.v_variables,
cmd.n_variables, sizeof *cmd.v_variables);