if (var_is_numeric (weight_var))
dict_set_weight (dict, weight_var);
else
- sys_error (r, -1, _("Weighting variable must be numeric "
- "(not string variable `%s')."),
- var_get_name (weight_var));
+ sys_warn (r, -1, _("Ignoring string variable `%s' set "
+ "as weighting variable."),
+ var_get_name (weight_var));
}
if (extensions[EXT_DISPLAY] != NULL)
AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
])
AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
+DISPLAY DICTIONARY.
])
- AT_CHECK([pspp -O format=csv sys-file.sps], [1],
- [error: `sys-file.sav': Weighting variable must be numeric (not string variable `STR1').
+ AT_CHECK([pspp -O format=csv sys-file.sps], [0],
+ [warning: `sys-file.sav': Ignoring string variable `STR1' set as weighting variable.
+
+Variable,Description,,Position
+num1,Format: F8.0,,1
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+str1,Format: A4,,2
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 4,,
])
done
AT_CLEANUP