OT - Numeric Test Program?

B

bradwiseathome

Can anyone recommend a command-line callable .exe that will say if a
given parameter is numeric or not? I am writing a CMD and I need to
create an IF statement if a variable is numeric or not. I need to do a
kind of "isnumeric" comparison in my batch script.

Thanks.
 
T

Timo Salmi

Can anyone recommend a command-line callable .exe that will say if

A separate .exe is not necessary.
a given parameter is numeric or not? I am writing a CMD and I need
to create an IF statement if a variable is numeric or not. I need
to do a kind of "isnumeric" comparison in my batch script.

106) How to test whether a variable is a non-negative integer?
163586 May 1 2006 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo
 
J

Jerold Schulman

Can anyone recommend a command-line callable .exe that will say if a
given parameter is numeric or not? I am writing a CMD and I need to
create an IF statement if a variable is numeric or not. I need to do a
kind of "isnumeric" comparison in my batch script.

Thanks.

See tip 6301 » How do I determine if a string is all alphabetic or all numeric?
in the 'Tips & Tricks' at http://www.jsifaq.com

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top