mIRC Home    About    Download    Register    News    Help

Print Thread
$min $max dont play well among themselves #267636 25/08/20 09:17 PM
Joined: Jan 2004
Posts: 1,388
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,388
Code
//echo 3 -a $min(70,500,60) $min(70,500,60).text | echo 4 -a $min(70,500,60) foo $min(70,500,60).text | echo 3 -a $min(70,500,60) $max(70,500,60).text | echo 4 -a $max(70,500,60) foo $min(70,500,60).text | var -s %a $min(700,500,60) $min(700,500,60)


result:
$min(70,500,60).text 60
foo foo 60
$max(70,500,60).text 500
500 foo 60
* Set %a to $min(700,500,60) 60

The only combo here that didn't return wrong results is when $max preceded $min

edit: looks like it's just $min is somehow evaluating the rest of the command line
//echo 3 -a $version $min(1,2,3) $version
result:
7.63 $version 7.63

edit again: The problem with evaluating outside the parenthesis also exists with $max, it's just that text was evaluating as zero, so wasn't showing in the 1st example.

//echo 3 -a $max(-1,-2,-3) foo $min(70,500,60)
result:
foo foo 60

Last edited by maroon; 25/08/20 09:43 PM.
Re: $min $max dont play well among themselves [Re: maroon] #267637 26/08/20 12:23 PM
Joined: Dec 2002
Posts: 4,799
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,799
Thanks, this issue has been fixed for the next version.