BTst Function

Returns the status of 1 bit in a number.

Syntax
BTst (number, bitNum)

Parameters

number
Specify the number for the bit test with an expression or numeric value.
bitNum
Specify the bit (integer from 0 to 31) to be tested.

Return Values
Returns the bit test results (integer 1 or 0) of the specified numeric value.

See Also
BClr Function, BClr64 Statement, BSet Function, BSet64 Function, BTst64 Function

BTst Function Example

Long flags
flags = BSet(flags, 1)
If BTst(flags, 1) = 1 Then
    Print "Bit 1 is set"
EndIf