BitTest

Determines whether the specified bit is set

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:Bit Array

Syntax

  #include <nwbitops.h>  
   
  LONG BitTest  (  
     void   *bitArray,   
     LONG    bitNumber); 
  

Parameters

bitArray
(IN) Points to the bit array.
bitNumber
(IN) Specifies an index into the bit array.

Return Values

This function returns a bit value of 0 if the specified bit is cleared. Otherwise, it returns a value of 1.

Remarks

The bitArray parameter specifies the target array. The bit number can be greater than 32, targeting a bit well into the target array.

See Also

BitClear, BitSet

Example

  #include <nwbitops.h>  
  LONG    bitValue;  
  void   *bitArray;  
  LONG    bitNumber;  
  bitValue = BitTest (bitArray, bitNumber);