invert sense. Fix up all references.
+Wed Apr 26 20:00:00 2006 Ben Pfaff <blp@gnu.org>
+
+ * procedure.c (create_trns_case): Fix inverted decision on whether
+ numeric values should be initialized to 0 or SYSMIS.
+
Wed Apr 26 19:48:52 2006 Ben Pfaff <blp@gnu.org>
Continue reforming procedure execution. In this phase, assert
+Wed Apr 26 20:01:19 2006 Ben Pfaff <blp@gnu.org>
+
+ * variable.h: (struct variable) Rename `reinit' member as `leave'
+ and invert sense. Fix up all references.
+
Wed Apr 26 19:39:28 2006 Ben Pfaff <blp@gnu.org>
Continue reforming procedure execution. In this phase, break
v->width = width;
v->fv = d->next_value_idx;
v->nv = width == 0 ? 1 : DIV_RND_UP (width, 8);
- v->reinit = dict_class_from_id (v->name) != DC_SCRATCH;
+ v->leave = dict_class_from_id (v->name) == DC_SCRATCH;
v->index = d->var_cnt;
mv_init (&v->miss, width);
if (v->type == NUMERIC)
short_name[] is intentionally not copied, because there is
no reason to give a new variable with potentially a new name
the same short name. */
- nv->reinit = ov->reinit;
+ nv->leave = ov->leave;
mv_copy (&nv->miss, &ov->miss);
nv->print = ov->print;
nv->write = ov->write;
/* Case information. */
int fv, nv; /* Index into `value's, number of values. */
- bool reinit; /* True: reinitialize; false: leave. */
+ bool leave; /* Leave value from case to case? */
/* Data for use by containing dictionary. */
int index; /* Dictionary index. */
size_t j;
value_init = var->type == NUMERIC ? INP_NUMERIC : INP_STRING;
- value_init |= var->reinit ? INP_REINIT : INP_INIT_ONCE;
+ value_init |= var->leave ? INP_INIT_ONCE : INP_REINIT;
for (j = 0; j < var->nv; j++)
inp->init[j + var->fv] = value_init;
if (!parse_variables (default_dict, &v, &nv, PV_NONE))
return CMD_CASCADING_FAILURE;
for (i = 0; i < nv; i++)
- {
- if (!v[i]->reinit)
- continue;
- v[i]->reinit = 0;
- }
+ v[i]->leave = true;
free (v);
return lex_end_of_command ();
/* Goofy behavior, but compatible: Turn off LEAVE. */
if (dict_class_from_id (compute->variable->name) != DC_SCRATCH)
- compute->variable->reinit = 1;
+ compute->variable->leave = false;
}
else
{
union value *value = case_data_rw (trns_case, v->fv);
if (v->type == NUMERIC)
- value->f = v->reinit ? 0.0 : SYSMIS;
+ value->f = v->leave ? 0.0 : SYSMIS;
else
memset (value->s, ' ', v->width);
}
for (i = 0; i < var_cnt; i++)
{
struct variable *v = dict_get_var (default_dict, i);
- if (v->reinit)
+ if (!v->leave)
{
if (v->type == NUMERIC)
case_data_rw (c, v->fv)->f = SYSMIS;