devxlogo

BitSet – Set a bit in a number

BitSet – Set a bit in a number

' 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 is performed in Power2()    BitSet = (value Or Power2(bit))End Function

devx-admin

Share the Post: