mIRC Home    About    Download    Register    News    Help

Print Thread
$base bug #29222 11/06/03 09:34 PM
Joined: Dec 2002
Posts: 19
R
RG_ Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Dec 2002
Posts: 19
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.

Re: $base bug #29223 11/06/03 09:40 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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.

Re: $base bug #29224 11/06/03 11:33 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
/set -l ? interesting...

Re: $base bug #29225 12/06/03 12:13 AM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Yea that was discussed on another thread, apparently /var internally evaluates to /set -l

Re: $base bug #29226 12/06/03 09:33 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: $base bug #29227 14/06/03 10:10 PM
Joined: Mar 2003
Posts: 27
Q
Quietust Offline
Ameglian cow
Offline
Ameglian cow
Q
Joined: Mar 2003
Posts: 27
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).


* Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another
Re: $base bug #29228 16/06/03 01:33 AM
Joined: Feb 2003
Posts: 2,692
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,692
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


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