View Single Post
  #6   Spotlight this post!  
Unread 24-01-2008, 17:34
mneary mneary is offline
Registered User
FRC #1759
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Los Angeles
Posts: 45
mneary is an unknown quantity at this point
Send a message via AIM to mneary
Re: #define's scope?

Quote:
I suppose this is the same as any other global variable, except global variables have to be defined at the top of the file, or the top of the function. #defines can be used anywhere.
#define does not create a variable, code is not generated, memory is not allocated. It is basically a command to the preprocessor to substitute one phrase for another.