CrGlobal: BitOn

BitOn

determine whether a specified bit is on (i.e., set, one) in an integer value

 Public Function BitOn(
	  ByVal TestValue As Variant,
	  ByVal Bit As Integer ) As Boolean

Parameters

TestValue
[ByVal] Variant. integer value
Bit
[ByVal] Integer. bit number

Return Values

Boolean -  Bit is on in TestValue

Remarks

If TestValue is a Double, the function evaluates it as a Long.

Returns False if bad arguments are passed.

This function may be called recursively if:

  1. Select statement on TestValues VarType stays intact, and
  2. recursive call is in a Case for a particular VarType, and
  3. TestValue argument is converted to a non-circular type.

See Also

Project crgenlib Overview Class CrGlobal Overview CrGlobal Properties CrGlobal Methods BitNegative BitSet