torkell: (Default)
[personal profile] torkell
Memo to self: a bitwise OR is not the same as a logical OR.

(that bug took me the past hour to track down)

Date: 2006-01-25 01:15 am (UTC)
From: [identity profile] olego.livejournal.com
Interestingly, yesterday I tried AND to turn a bit on, and XOR to turn it off. *smacks forehead*

Date: 2006-01-25 08:19 pm (UTC)
From: [identity profile] olego.livejournal.com
Actually, the XOR worked fine because it followed an IF:

if (bit is set)
xor
else
and

I couldn't understand why the and wasn't working. And then it struck me.

And then I and ~bitmask. :-)

December 2025

S M T W T F S
  1 2 3 4 5 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 27th, 2025 06:15 pm
Powered by Dreamwidth Studios