Em seg., 9 de out. de 2023 às 16:37, IOhannes m zmölnig zmoelnig@iem.at escreveu:
Am 9. Oktober 2023 18:22:11 MESZ schrieb Alexandre Torres Porres < porres@gmail.com>:
*var.c:80:22: **error: **assigning to 'float' from incompatible type 't_float *'*
Well it's just what it says: you are trying to assign a `t_float*` value to a `t_float`. A `t_float` is some floating type, and it is not allowed to use it to store a pointer.
Ok, your comment already did shed some light. And looking closely, the [value] code actually uses *x_floatstar ... so let me get this straight, that makes it a pointer then, so it works. Now, I'm also using the same thing to create an array of values, that can be set with something like x->x_fval[i]. This is where things get confusing to me. Now, in an earlier version, this was working and initialized as **x_fval which then it seems it is a pointer to the array of values?
In the end, the question would be how to initialize a variable that can take the pointer correctly. Was the last compilable code from https://github.com/porres/pd-else/blob/cd1406cff28baf1eb056d1500fb0d62694171... completely correct? I guess I got lucky then and when tried to fix what wasn't broken I just ruined it. And the bugs I was trying to fix were unrelated.
Another good question would be simple online courses that could help me understand things a little better :)
thanks
What's the question?
mfg.sfg.jfd IOhannes
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev