BitToggle – Invert a bit in a value
‘ Toggle a bit in a value” NOTE: requires Power2()Function BitToggle(ByVal value As Long, ByVal bit As Long) As Long ‘ simply XOR with the negation of the bit mask
‘ Toggle a bit in a value” NOTE: requires Power2()Function BitToggle(ByVal value As Long, ByVal bit As Long) As Long ‘ simply XOR with the negation of the bit mask
‘ Rotate an Integer to the right the specified number of times” NOTE: requires Power2()Function RotateRightI(ByVal value As Integer, ByVal times As Long) As Integer Dim i As Long, signBits
‘ Rotate an Integer to the left the specified number of times” NOTE: requires Power2()Function RotateLeftI(ByVal value As Integer, ByVal times As Long) As Integer Dim i As Long, signBits
‘ Shift to the left of the specified number of times” NOTE: requires Power2()Function ShiftLeft(ByVal value As Long, ByVal times As Long) As Long ‘ we need to create a
‘ Clear a bit in a value” NOTE: requires Power2()Function BitClear(ByVal value As Long, ByVal bit As Long) As Long ‘ simply AND with the negation of the bit mask
‘ Test the value of a bit” NOTE: requires Power2()Function BitTest(ByVal value As Long, ByVal bit As Long) As Boolean ‘ simply AND with the bit mask ‘ Range checking
‘ Set a bit in a value” NOTE: requires Power2()Function BitSet(ByVal value As Long, ByVal bit As Long) As Long ‘ simply OR with the bit mask ‘ Range checking
‘ Rotate a Long to the right the specified number of times” NOTE: requires Power2()Function RotateRight(ByVal value As Long, ByVal times As Long) As Long Dim i As Long, signBits
‘ Rotate a Long to the left the specified number of times” NOTE: requires Power2()Function RotateLeft(ByVal value As Long, ByVal times As Long) As Long Dim i As Long, signBits