hoc pointer to variable
Posted: Wed Oct 13, 2010 1:22 pm
I'd can't seem to get Pointer(&x) to work. I tested
objref arrow
age=33
arrow = Pointer(&age)
but it doesn't work. I'm testing it to see if I can use it. Ultimately, I'm trying to find a way to have an array with elements that point to different variables (defined in hoc or mod files) so that I can loop through the array and call k=arrow.val or arrow.val=k. In C, it would be something like (my C is a bit rusty)
double * arrow[12]
double age=33
arrow[0]=&age
objref arrow
age=33
arrow = Pointer(&age)
but it doesn't work. I'm testing it to see if I can use it. Ultimately, I'm trying to find a way to have an array with elements that point to different variables (defined in hoc or mod files) so that I can loop through the array and call k=arrow.val or arrow.val=k. In C, it would be something like (my C is a bit rusty)
double * arrow[12]
double age=33
arrow[0]=&age