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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/19/02 05:45
Read: times


 
#27483 - _testbit_ vs IF stmt C51
Hi all

I was just reading about the functions included in intrins.h in Rai and Keil C51 and was wondering if anyone knows about the testbit function and why you would use it.

For instance (from a search on this site on serial buffering)

SerialIntState = _testbit_(ES);

Couldn't you just write
SerialIntState = ES;

or in the case you actually wanted to test if it was "1" or "0" then just an if would do the trick (wouldn't it?)

if (_testbit_(ES))

if (ES)


Your Thoughts

Regards


Marshall Brown



List of 3 messages in thread
TopicAuthorDate
_testbit_ vs IF stmt C51            01/01/70 00:00      
RE: _testbit_ vs IF stmt C51            01/01/70 00:00      
RE: _testbit_ vs IF stmt C51            01/01/70 00:00      

Back to Subject List