View Single Post
  #3   Spotlight this post!  
Unread 24-01-2008, 14:21
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: #define's scope?

If you want to use different values I would suggest just using a global variable. What #define does is when you compile your code the compiler replaces wherever you have what your define is with its value.

example

Code:
#define VARIABLE rc_dig_in01;


printf("%d",VARIABLE);

will look like this after you compile it

Code:
printf("%d",rc_dig_in01);