?

Log in

No account? Create an account
Memo to self: a bitwise OR is not the same as a logical OR. (that… - 'Twas brillig, and the slithy toves did gyre and gimble in the wabe [entries|archive|friends|userinfo]
Thomas

[ website | Beware the Jabberwock... ]
[ deviantArt | the-boggyb ]
[ FanFiction | Torkell ]
[ Tumblr | torkellr ]

Links
[Random links| BBC news | Vulture Central | Slashdot | Dangerous Prototypes | LWN | Raspberry Pi]
[Fellow blogs| a Half Empty Glass | the Broken Cube | The Music Jungle | Please remove your feet | A letter from home]
[Other haunts| Un4seen Developments | Jazz 2 Online | EmuTalk.net | Feng's shui]

[Monday 23rd January 2006 at 12:46 am]
Thomas

boggyb
[Tags|, ]
[Feeling |annoyedannoyed]
[Playing |Sloppiness Loses Lives ~ Andy Garfield/IMPS Collection 1]

Memo to self: a bitwise OR is not the same as a logical OR.

(that bug took me the past hour to track down)
Link | Previous Entry | Share | Next Entry[ 3 pennies | Penny for your thoughts? ]

Comments:
[User Picture]From: olego
Wednesday 25th January 2006 at 1:15 am (UTC)
Interestingly, yesterday I tried AND to turn a bit on, and XOR to turn it off. *smacks forehead*
(Reply) (Thread)
[User Picture]From: boggyb
Wednesday 25th January 2006 at 8:11 pm (UTC)
That must have given you some fun bugs, especially the XOR.
(Reply) (Parent) (Thread)
[User Picture]From: olego
Wednesday 25th January 2006 at 8:19 pm (UTC)
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. :-)
(Reply) (Parent) (Thread)