[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: checking for numeric chars
You can use the INSTR command.
Assuming that $char is a single character that you want to test to see if its
numeric, you could:
let #position = instr('0123456789',$char,0)
If #position > 0, then $char is numeric
If #position = 0, then $char is not numeric
David Thompson-Hall <david.thompson-hall@DOIT.WISC.EDU> on 02/11/2002 04:37:21
PM
Please respond to sqr-users@list.iex.net
To: SQR-USERS@list.iex.net
cc: (bcc: Rick Creel/IT/Aon Consulting)
Subject: checking for numeric chars
OK, this is a beginners question, and I know various answers, so I'll ask
it as a best practices question...
What's the *best* way to check if a character is numeric (0-9)in SQR?
DTH
David Thompson-Hall 1210 W. Dayton St.
Programmer/Analyst Madison, WI 53706
Apps Tech/Operational Support Apps 608/265-9571
Div of Info Technology (DoIT)
University of Wisconsin-Madison david.thompson-hall@doit.wisc.edu