Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: bitmask deciphering listbits UDF
#DefineFunction ListBits(bitmask) bitstring = "" bit = 1 While bitmask ;while there's still a bitmask value If bitmask & bit ;check bit bitstring = StrCat(bitstring, bit, @CRLF) bitmask = bitmask & ~bit ;decrement working bitmask number by existing byte increments Endif bit = bit * 2 ;increment byte EndWhile Return (bitstring) #EndFunction bitmask = 10776 ;bitmask = -1610612736 bitstring = ListBits(bitmask) Message("Bits in bitmask", bitstring)
Article ID: W14985
File Created: 2001:11:08:12:41:18
Last Updated: 2001:11:08:12:41:18