View Single Post
  #1   Spotlight this post!  
Unread 04-02-2004, 14:55
sear_yoda sear_yoda is offline
Kid With The Credit Card
None #1189 (Breaking Pointe)
Team Role: Alumni
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Grosse Pointe, MI
Posts: 19
sear_yoda will become famous soon enoughsear_yoda will become famous soon enough
Send a message via ICQ to sear_yoda Send a message via AIM to sear_yoda Send a message via Yahoo to sear_yoda
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.