Public Function FlipBit( _
ByVal vValue As Variant _
, ByVal vBit As Variant _
) As Variant
Perform the logical "Not" operation on one of the bits within a value. Truth table:
Function uses the GetBit and SetBit functions; see them for details.
0 | 1
1 | 0Examples:
FlipBit(0, 5) = 16
FlipBit(-1, 5) = -17
FlipBit(255, 5) = 239
FlipBit("BC", 5) = "BS"See also:
SetBit FunctionvValue: Value in which the Not operation will be performed on one of its bits. Function returns Null if vValue is Null.
vBit: The number of the bit on which the Not operation will be performed. Function returns Null if vBit is Null or cannot be fixed up to a number. Function returns Null if vBit is <= 0 (less than or equal to zero). Function returns Null if vBit is greater than the number of bits within the value vValue.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.