mIRC Homepage
Posted By: RG_ $base bug - 11/06/03 09:34 PM
Try this:
Code:
//var %tmp = $base(-1,2,10,8) | echo : %tmp

It returns set -l %tmp $base(-1,2,10,8)-00000001
It seems that in v5.91 works fine.
Posted By: codemastr Re: $base bug - 11/06/03 09:40 PM
Seems like a bug, however I can tell why it most likely happens. I'm guessing /var just doesn't work outside of an alias/event. Because if you change the /var to a /set it then works fine.
Posted By: Online Re: $base bug - 11/06/03 11:33 PM
/set -l ? interesting...
Posted By: codemastr Re: $base bug - 12/06/03 12:13 AM
Yea that was discussed on another thread, apparently /var internally evaluates to /set -l
Posted By: qwerty Re: $base bug - 12/06/03 09:33 AM
It's not hard to see that /var works just fine in the command line: //var %a = 5 | echo - s $calc(5 + %a)

The problem is indeed with $base(): when negative numbers are used AND the <zeropad> parameter is specified, weird things happen. Probably somebody forgot to clear a buffer or something. Examples:

//set %a hello | echo -s $base(-5,10,4) -> works normally
//set %a hello | echo -s $base(5,10,4,7) -> works normally
//set %a hello | echo -s $base(-5,10,4,7) -> returns the correct result, but prefixed with the value of %a
Posted By: Quietust Re: $base bug - 14/06/03 10:10 PM
Try evaluating it from an input box using the TAB key; when I tried, I got some VERY odd text at the beginning (the titlebar text with the first 8 bytes chewed up).
Posted By: Raccoon Re: $base bug - 16/06/03 01:33 AM
I don't have either of these problems in mIRC 6.00. Yet another reason why I wont upgrade.

//var %tmp = $base(-1,2,10,8) | echo -a %tmp
000000-1
//set %a hello | echo -a $base(-5,10,4,7)
0000-11

Yes, the negative should appear before the padding... but there don't appear to be any buffer issues with /var /set -l, etc.

- Raccoon
© mIRC Discussion Forums