mIRC Home    About    Download    Register    News    Help

Print Thread
#58056 28/10/03 04:00 AM
Joined: Oct 2003
Posts: 1
C
Mostly harmless
OP Offline
Mostly harmless
C
Joined: Oct 2003
Posts: 1
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
Joined: Mar 2003
Posts: 27
Q
Ameglian cow
Offline
Ameglian cow
Q
Joined: Mar 2003
Posts: 27
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.


* Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another
#58058 28/10/03 01:27 PM
Joined: Feb 2003
Posts: 2,811
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,811
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