+ const int base_index = cat->iap[i].base_subscript_short;
+
+ int v;
+ double result = 1.0;
+
+ for (v = 0; v < iact->n_vars; ++v)
+ {
+ const struct variable *var = iact->vars[v];
+
+ const union value *val = case_data (c, var);
+ const int width = var_get_width (var);
+ const struct variable_node *vn = lookup_variable (&cat->varmap, var, hash_pointer (var, 0));
+
+ const unsigned int hash = value_hash (val, width, 0);
+ const struct value_node *valn = lookup_value (&vn->valmap, val, hash, width);
+
+ /* Translate the subscript into an index for the individual variable */
+ int index = (subscript - base_index) % cat->iap[i].df[v];
+ if ( v > 0)
+ index /= cat->iap[i].df[v - 1];
+
+ double bin = 1.0;
+#if EFFECTS_CODING
+ if ( valn->index == 0)
+ bin = -1.0;
+ else
+#endif
+ if ( valn->index != index )
+ bin = 0;
+
+ result *= bin;
+ }