GetBit - method of object Pm
Returns the bit value of the variable.
GetBit(Value As Variant, nIndex As Integer) As Boolean
b = Pm.GetBit(Value, nIndex)
|Value||(Variant) The value whose bit has to be checked up. The value must be integer (Byte, Integer, Long).|
|nIndex||(Integer) Index of the bit in the variable (zero-based index).|
Return value true is here not -1, but 1, because the experience shows it more practical in this case.
1 - bit is set
0 - bit is not set
The method can also be called in the graphic item events for Web panels
Detects the 20th bit value in the BitMask variable
if (Pm.GetBit(BitMask, 20))
//... An action if the bit is set