Skip to Main Content
Thomas (
torkell
) wrote
2006
-
01
-
23
12:46 am
Current Mood:
annoyed
Current Music:
Sloppiness Loses Lives ~ Andy Garfield/IMPS Collection 1
Entry tags:
argh
,
programming
(no subject)
Memo to self: a bitwise OR is not the same as a logical OR.
(that bug took me the past hour to track down)
Flat
|
Top-Level Comments Only
no subject
olego.livejournal.com
2006-01-25 01:15 am (UTC)
(
link
)
Interestingly, yesterday I tried AND to turn a bit on, and XOR to turn it off. *smacks forehead*
no subject
torkell
2006-01-25 08:11 pm (UTC)
(
link
)
That must have given you some fun bugs, especially the XOR.
no subject
olego.livejournal.com
2006-01-25 08:19 pm (UTC)
(
link
)
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. :-)
3 comments
Post a new comment
Flat
|
Top-Level Comments Only
Log in
Account name:
Password:
Remember me
Other options:
Forget your password?
Log in with OpenID?
Close
menu
Log in
Create
Create Account
Display Preferences
Explore
Interests
Directory Search
Site and Journal Search
Latest Things
Random Journal
Random Community
FAQ
Shop
Buy Dreamwidth Services
Gift a Random User
DW Merchandise
Interest
Region
Site and Account
FAQ
Email
no subject
no subject
no subject
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. :-)