Simple Question: Please read
I have the following code snippet from my program that i am working on
bit running = 0;
float var1, average_value;
void is_something_running(void) {
if (fabs(var1 - average_value) <= 0.001){
return *(&running) = 0; }
else
return *(&running) = 1;
}
var1 and average value get their value from somewhere else.
My question is, can I change a value by referencing to it with a pointer to its address <return *(&running)>. Is this good programming?
Thanks,
MT