|
| _testclear_| Summary | |
#include <intrins.h>
bit _testclear_ (
bit b); /* bit to test and clear */
| | Description | | The _testclear_ routine generates a JBC instruction in the generated program code to simultaneously test the bit and clear it to 0. This routine can be used only on directly addressable bit variables and is invalid on any other type of expression. This routine is implemented as an intrinsic function. The code generated is inline rather than being called. | | Return Value | | The _testclear_ routine returns the value of the bit. | | See Also | | _testset_ | | Example | |
#include <intrins.h>
#include <stdio.h> /* for printf */
void tst_testbit (void) {
bit test_flag;
if (_testclear_ (test_flag))
printf ("Bit was set\n");
else
printf ("Bit was clear\n");
}
|
Related Knowledgebase Articles |
|