/* Returns the value of D's weighting variable in case C, except that a
negative weight is returned as 0. Returns 1 if the dictionary is
unweighted. Will warn about missing, negative, or zero values if
/* Returns the value of D's weighting variable in case C, except that a
negative weight is returned as 0. Returns 1 if the dictionary is
unweighted. Will warn about missing, negative, or zero values if
if an invalid weight is found. */
double
dict_get_case_weight (const struct dictionary *d, const struct ccase *c,
if an invalid weight is found. */
double
dict_get_case_weight (const struct dictionary *d, const struct ccase *c,
if (w < 0.0 || mv_is_num_missing (&d->weight->miss, w))
w = 0.0;
if ( w == 0.0 && *warn_on_invalid ) {
if (w < 0.0 || mv_is_num_missing (&d->weight->miss, w))
w = 0.0;
if ( w == 0.0 && *warn_on_invalid ) {
msg (SW, _("At least one case in the data file had a weight value "
"that was user-missing, system-missing, zero, or "
"negative. These case(s) were ignored."));
msg (SW, _("At least one case in the data file had a weight value "
"that was user-missing, system-missing, zero, or "
"negative. These case(s) were ignored."));