in reply to Re: bitmask check
in thread bitmask check
I know this is 2 years old but I stumbled on this and it might similarly confuse someone else.
THIS is the corrected bit_test subroutine
sub bit_test { my ($value, $bit) = @_; return $value & (1 << $bit); }
Original code would only test the first bit position (1 << 0).
|
|---|