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. :-)

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 7th, 2026 11:06 am
Powered by Dreamwidth Studios