To perform bitwise operation like | and & where one needs to turn off a bit we need a bitwise negation operator.


Turn on bit: $x = $x | 64
Turn off bit: $x = $x & ~64

In this example "~" performs a bitwise negation so that performing a bitwise "and" of bits only turn off the bit representing 64.
_________________________
Home page: http://www.kixhelp.com/hb/