[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: case_data_rw()
From: |
Ben Pfaff |
Subject: |
Re: case_data_rw() |
Date: |
Fri, 14 Apr 2006 10:36:37 -0700 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
Jason Stover <address@hidden> writes:
> I successfully created a variable called residuals with
> dict_create_var_assert (default_dict, "residuals", 0). I'm
> having trouble putting any values in the active file, though,
> and I want to make sure I'm using case_data_rw () correctly:
>
> union value *w_val;
> w_val = case_data_rw (&c, residuals->fv);
> w_val->f = (*lc->residual) (v_variables, vals, obs, lc, n_variables);
>
> Should that last line assign the value returned by (*lc->residual) (...)
> to the value in the current case c?
This code looks correct and it should have the effect you indicate.
> The LIST command shows nothing but missing values for the new
> variable. And gdb doesn't follow the program in the casereading
> loop, so it's hard to see what's going on. (But I can see
> *lc->residual returns the correct doubles.)
I think there must be some other subtlety that is causing a
problem. Perhaps you can post the file diff or otherwise
describe the larger context.
--
Ben Pfaff
email: address@hidden
web: http://benpfaff.org
- case_data_rw(), Jason Stover, 2006/04/14
- Re: case_data_rw(),
Ben Pfaff <=