| View previous topic :: View next topic |
| Author |
Message |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Tue Jun 06, 2006 2:05 pm Post subject: If variable is a number, then... |
|
|
Hello!
I made a script that lets me delete a line of a textfile. So with "!del 3" I can delete the third line. Is there a command that checks a variable whether it is a letter or a number? |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Tue Jun 06, 2006 2:09 pm Post subject: |
|
|
| Code: | | [string is integer <string>] |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Tue Jun 06, 2006 7:27 pm Post subject: |
|
|
In most cases you want to add ' -strict' after integer, since it would be true on empty strings. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
|