Thread: onwall and such
View Single Post
  #39  
Old 05-24-2006, 02:21 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by jake13jake
Tell me, why would you write
if( (x==2) || (x==3) || (x==5) || (x==7) )

When you could write

if( (1<<x) & ((1<<2)|(1<<3)|(1<<5)|(1<<7) )

I'll tell you what though, I've only been recently learning how to use bitwise operators.
Because the compiler would interpret those as bitwise operators. if(function()) is doing an '== true' check, if(function() == true) is NOT doing two checks for true. If you honestly think I am wrong in this, then you would think that if(function() == false) is doing a check for both true and false.

Read my damn text before you reply. I am done with this thread.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")