Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/28/03 07:51
Read: times


 
#61455 - RE: c51 if validation
Responding to: ???'s previous message
I didn't understand following 'if ' statement validations...

1. if(test&0x80){}

2. if(test|0x01){}

If the expression within the parentheses evaluates to nonzero, then the statement immediately following the parentheses is executed. So,
  1. If test's bit 7 is set, the statement within the braces is executed.

  2. The statement within the braces is always executed because OR'ing test with 0x01 causes the conditional expression to evaluate to nonzero.



List of 3 messages in thread
TopicAuthorDate
c51 if validation            01/01/70 00:00      
   RE: c51 if validation            01/01/70 00:00      
   Back to basics            01/01/70 00:00      

Back to Subject List