mIRC Home    About    Download    Register    News    Help

Topic Options
#264319 - 20/11/18 05:52 AM $isbit $biton $bitoff bit=33/34
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 969
These bitwise operators are shadowing bits 33-34 onto bits 1-2. I know the valid range is 1-32, but $isbit(-1,34) had initially fooled someone into thinking the range was 1-34.

Code:
//var %i -65535 , %j 0 | while (%i <= 65535) { if ($isbit(%i,1) != $isbit(%i,33)) echo -a %i : $v1 vs $v2 | inc %j | inc %i } | echo -a %j
//var %i -65535 , %j 0 | while (%i <= 65535) { if ($isbit(%i,2) != $isbit(%i,34)) echo -a %i : $v1 vs $v2 | inc %j | inc %i } | echo -a %j

//var %i -65535 , %j 0 | while (%i <= 65535) { if ($biton(%i,1) != $biton(%i,33)) echo -a %i : $v1 vs $v2 | inc %j | inc %i } | echo -a %j
//var %i -65535 , %j 0 | while (%i <= 65535) { if ($biton(%i,2) != $biton(%i,34)) echo -a %i : $v1 vs $v2 | inc %j | inc %i } | echo -a %j

//var %i -65535 , %j 0 | while (%i <= 65535) { if ($bitoff(%i,1) != $bitoff(%i,33)) echo -a %i : $v1 vs $v2 | inc %j | inc %i } | echo -a %j
//var %i -65535 , %j 0 | while (%i <= 65535) { if ($bitoff(%i,2) != $bitoff(%i,34)) echo -a %i : $v1 vs $v2 | inc %j | inc %i } | echo -a %j


Top
#264320 - 20/11/18 09:55 AM Re: $isbit $biton $bitoff bit=33/34 [Re: maroon]
Khaled Offline


Planetary brain

Registered: 04/12/02
Posts: 4295
Loc: London, UK
Thanks this issue has been fixed for the next version.

Top