mIRC Homepage
Posted By: Vliedel eval bug - 21/08/07 02:23 PM
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
Posted By: Albie Re: eval bug - 21/08/07 08:30 PM
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
%) = %
%)( = %
Posted By: Vliedel Re: eval bug - 21/08/07 09:39 PM
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
© mIRC Discussion Forums