mIRC Home    About    Download    Register    News    Help

Print Thread
eval bug #183651 21/08/07 02:23 PM
Joined: May 2007
Posts: 27
V
Vliedel Offline OP
Ameglian cow
OP Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
Those two lines should give the same result afaik, but the second tries to evaluate (or at least check the format of) $comchan while it shouldn't.

Code:
//var %a = $!comchan($me,0 | var %b$comchan($me,0 = bla | echo -ag * %b [ $+ [ %a ] ]
  returns: * bla

//var %a = $!comchan($me,0 | var %b$comchan($me,0 = bla | echo -ag * $($+(%,b,%a),2)
  returns: * Invalid format: $evalnext


Tested on 6.2 and 6.3

Last edited by Vliedel; 21/08/07 03:05 PM.
Re: eval bug [Re: Vliedel] #183685 21/08/07 08:30 PM
Joined: Jan 2005
Posts: 2
A
Albie Offline
Bowl of petunias
Offline
Bowl of petunias
A
Joined: Jan 2005
Posts: 2
I think you've over complicated the example, the bug exists when using unevan or unordered parentheses.

Code:
var %() = Test1, %( = Test2, %) = Test3, %)( = Test4
echo -ag $eval(% $+ $chr(40) $+ $chr(41),1) = $eval(% $+ $chr(40) $+ $chr(41),2)
echo -ag $eval(% $+ $chr(40),1) = $eval(% $+ $chr(40),2)
echo -ag $eval(% $+ $chr(41),1) = $eval(% $+ $chr(41),2)
echo -ag $eval(% $+ $chr(41) $+ $chr(40),1) = $eval(% $+ $chr(41) $+ $chr(40),2)

To above would echo out:
Code:
%() = Test1
* Invalid format: $evalnext
%) = %
%)( = %


Albie
Re: eval bug [Re: Albie] #183688 21/08/07 09:39 PM
Joined: May 2007
Posts: 27
V
Vliedel Offline OP
Ameglian cow
OP Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
hmm yeah my example is the way i got troubles, also i liked to show the [ ] method did work.
But funny to see it only fails in 1 case