Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric string or not?
Message
From
22/03/2001 09:10:02
 
 
To
21/03/2001 19:26:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00487462
Message ID:
00487549
Views:
9
Hi David.

>> Is there a quick way to determine if a character string represents a legal numeric string (contains only digits and maybe a sign or .)? <<

In addition to what the others have told you, you can use the FoxTools StrFilter function to do this like so:
SET LIBRARY TO HOME()+"FoxTools"
LOCAL lcString, lcResultString

lcResultString = StrFilter( lcString, "01234567+-." )
IF lcResultString == lcString
   *** The original string contains only legal characters
ENDIF
Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform