mIRC Home    About    Download    Register    News    Help

Print Thread
#58056 28/10/03 04:00 AM
C
cyberjag
cyberjag
C
Unless I'm wrong, the NOT of 0 is supposed to be 1 ...

//echo 0 $not(0)

returns

4294967295

$isbit seems to be off, too.

#58057 28/10/03 07:13 AM
Q
Quietust
Quietust
Q
I believe $not is acting as a bitwise NOT, rather than a boolean NOT. If this is the case, then it is behaving correctly - ~0x00000000 == 0xFFFFFFFF, or 4294967295.

#58058 28/10/03 01:27 PM
Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
And $isbit works fine here.

$base(42,10,2) == 101010

101010 : $isbit(42,1) == 0
101010 : $isbit(42,2) == 1
101010 : $isbit(42,3) == 0
... etc ...

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard