This figure shows the pin diagram of the TestBit function:
The TestBit function tests one bit specified by the bit in the given DWORD input. The bits are counted from low to high starting with 0.
The output shows the status of presence of bit in that specified position. The valid range is 0 to 31.
This table describes the input pins of the TestBit function:
Input |
Data Type |
Description |
---|---|---|
i_dwIput |
DWORD |
Input value Range: 0...4294967295 |
i_iPos |
INT |
Bit position Range: 0...31 |
This table describes the output pins of the TestBit function:
Output |
Data Type |
Description |
---|---|---|
TestBit |
BOOL |
Result is True or False |
If the i_iPos input is not within the valid range, the input will be interpretated in modulo mode.
This figure shows an example of the TestBit function: