Apr 4, 2005 #1 H Help Advanced Member level 2 Joined Feb 15, 2005 Messages 617 Helped 7 Reputation 14 Reaction score 3 Trophy points 1,298 Activity points 7,065 Hi... Anyone help me to explain this #define SWITCH_PRESSED (bit) 1?? Is it define the switch_pressed is High?? Thanks.....
Hi... Anyone help me to explain this #define SWITCH_PRESSED (bit) 1?? Is it define the switch_pressed is High?? Thanks.....
Apr 4, 2005 #2 glenjoy Banned Joined Jan 1, 2004 Messages 962 Helped 72 Reputation 146 Reaction score 20 Trophy points 1,298 Location Philippines Activity points 0 C (#define) Means that when you used the keywords SWITCH_PRESSED it will return a 1 or gives a one.
Apr 4, 2005 #3 C C-Man Advanced Member level 4 Joined Jul 19, 2001 Messages 1,059 Helped 90 Reputation 180 Reaction score 17 Trophy points 1,318 Activity points 10,189 Re: C (#define) #defines are just text substitutions So whenever you write SWITCH_PRESSED the preprocessor will replace it with (bit) 1 before passing it to the compiler. Simple but powerful ... best regards
Re: C (#define) #defines are just text substitutions So whenever you write SWITCH_PRESSED the preprocessor will replace it with (bit) 1 before passing it to the compiler. Simple but powerful ... best regards