ItsMods
Does this work? - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: Does this work? (/Thread-Does-this-work.html)

Pages: 1 2


Does this work? - Pozzuh - 09-21-2011

@AZUMIKKEL doesn't think this piece of code works and I'm trolling.
So I'm making a poll to measure who thinks it does and who doesn't.

Code:
randomFunc() { if((13 & 37) == 5) iPrintLnBold("It works! :)"); }


edit: move to rage section if necessary.

Disclaimer:
This is a
Quote:thats like saying "LOL guys, he did this, and he's stupid, you're with me right? lets vote" in a real life scenario with 8 year olds
post. But i'm bored and feel no shame.


RE: Does this work? - iAegle - 09-21-2011

It probably works .. but do you know what it does/checks?


RE: Does this work? - JariZ - 09-21-2011

it won't work, you should use 13 + 37


RE: Does this work? - Nekochan - 09-21-2011

Lol,
its like
Code:
1337_hax = (13+37); if(randomInt(1337_hax) == 5) { iprintLn("1337 Modding"); }
?????


RE: Does this work? - Tomsen1410 - 09-21-2011

It works but do u know what? : P


RE: Does this work? - SuperNovaAO - 09-21-2011

(09-21-2011, 18:14)jariz Wrote: it won't work, you should use 13 + 37

Facepalm


RE: Does this work? - Pozzuh - 09-21-2011

but 13 + 37 is not 5


RE: Does this work? - iAegle - 09-21-2011

(09-21-2011, 19:52)SuperNovaAO Wrote:
(09-21-2011, 18:14)jariz Wrote: it won't work, you should use 13 + 37

Facepalm

So basicly it means that both of the values have to be true to continue?

since 0 is false and 1 < is true .. I guess this will work?


RE: Does this work? - Pozzuh - 09-21-2011

As I understand it, it works like this
00101011 = 83
00000111 = 15
00000011 = 3
Both numbers have the last 1s in common.


RE: Does this work? - SuperNovaAO - 09-21-2011

(09-21-2011, 19:59)Pozzuh Wrote: As I understand it, it works like this
00101011 = 83
00000111 = 15
00000011 = 3
Both numbers have the last 1s in common.

Yes, this is how a CPU sees it. No idea if it's implemented properly in CoDScript.

Just that we were talking about 13 and 37.

001101 = 13
100101 = 37
--------------------------
000101 = 5

The default Mac OS X and Windows XP+ calculators do this right btw.