mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Hello,

I wanna ask if mirc can have this in the next releases, for one more if checking operator, like exists already isnum the isdigit will also be helpfull for some of codes that is checking for digital numbers.

isdigit= digital number v1 is a digital number in the range v2 which is in the form n1-n2 (v2 optional)

- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
I don't see how this differs from isnum at all, could you explain better?

Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
isnum is accepting +number or -number or number.number values because it's number, but isdigit will not.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Not to distract from your feature request, but in the meantime you can use the following:

if ($regex($1,/^\d$/)) { a single digit }
if ($regex($1,/^\d+$/)) { one or more digits }
if ($regex($1,/^[0-9]$/)) { a single digit }
if ($regex($1,/^[0-9]+$/)) { one or more digits }


RegEx can help you be very specific about the nature of a string or value.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Originally Posted By: Raccoon
Not to distract from your feature request, but in the meantime you can use the following:

if ($regex($1,/^\d$/)) { a single digit }
if ($regex($1,/^\d+$/)) { one or more digits }
if ($regex($1,/^[0-9]$/)) { a single digit }
if ($regex($1,/^[0-9]+$/)) { one or more digits }


RegEx can help you be very specific about the nature of a string or value.


Thanks @Racoon, but Wims has already gave me $regex($1,^\d+$) regex (i still not have regex knowlegde yet!) but this operator is still be useful either that an custom identifier.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Code:
if (($1 isnum) && ($1 isalnum)) { }

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Originally Posted By: Loki12583
Code:
if (($1 isnum) && ($1 isalnum)) { }


Nice, Loki!


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Originally Posted By: Loki12583
Code:
if (($1 isnum) && ($1 isalnum)) { }


LOOOOOOOOL!!!!!!! shit, that one really helped.. thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard