mIRC Home    About    Download    Register    News    Help

Print Thread
isnum and negative #266591 31/12/19 02:19 AM
Joined: Jul 2006
Posts: 3,659
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,659
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


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: isnum and negative [Re: Wims] #266594 31/12/19 08:44 AM
Joined: Apr 2004
Posts: 846
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 846
Seems to work fine here, as long as you put the smaller number first?

Code
//if (-3 isnum -5--1) echo -a works


Saturn, QuakeNet staff
Re: isnum and negative [Re: Sat] #266596 31/12/19 02:59 PM
Joined: Jan 2004
Posts: 1,282
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,282
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

Re: isnum and negative [Re: Sat] #266599 31/12/19 03:54 PM
Joined: Jul 2006
Posts: 3,659
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,659
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!


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net