mIRC Homepage

isnum and negative

Posted By: Wims

isnum and negative - 31/12/19 02:19 AM

The isnum operator works fine on negative number as the first bound, but not on the second, could it be supported?

//if (2 isnum -5-5) echo -aworks
//if (-3 isnum -1--5) echo -a doesn't work, and should
Posted By: Sat

Re: isnum and negative - 31/12/19 08:44 AM

Seems to work fine here, as long as you put the smaller number first?

//if (-3 isnum -5--1) echo -a works
Posted By: maroon

Re: isnum and negative - 31/12/19 02:59 PM

Same thing happens with range of positive numbers not working unless the smaller number is first

//if (5 isnum 3-7) echo -a this shows
//if (5 isnum 7-3) echo -a this does not
Posted By: Wims

Re: isnum and negative - 31/12/19 03:54 PM

I see, It would be nice for isnum to support the other way around, my example should work as it works inside token functions to express relative to the end ranges, which I/scripts have been using for the past 20 years!
© 2020 mIRC Discussion Forums