|
Simple problem with variables
I'm trying not to be a total idiot here by checking all over the forums first, and reading all of the documentation, but I CANNOT figure out how to initilize a simple integer variable 'pressure' that equals the value from the pressure reader on analog input 1.
static unsigned int pressure = Get_Analog_Value(rc_ana_in01);
No matter where I put that, I can't get it to compile. It will compile fine in a few certain places in user_routines.c if it's just pressure = 0, but not this line. EVen if I split it up, it still doesn't work. All I get is syntax errors.
Does anyone else wish this compiler was a tiny bit more descriptive in its error debugging? I've been learning Java this year using the NetBeans IDE, and this MPLAB IDE makes me want to hurl my laptop across the room.
All of my coding depends on being able to initialize variables (well, duh) so this is really a stopping point for me. My entire team is getting sort of pissed off, becuase I just sit there looking angry every meeting trying to get the code to work.
Thanks in advance for any replies I recieve...I must be doing some simple thing wrong.
-Chris
__________________
throw away your microwave and eat cold food.
|