Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numbers in character field?
Message
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00448788
Message ID:
00448812
Views:
8
Cool expression Sergey!

Pete, add the period if you have to deal with decimals <s>
empty(alltrim(Chrtran(mystring,"1234567890."," ")))

>>Hi all,
>> I'm looking for a relatively easy way to identify if a character field contains only numbers. My application is testing for valid/real postal addresses and one of the checks I'd like to make is if the field contains nothing but numerical data. Can anyone point the way?
>>TIA,
>>Pete Adams
>
>Try:
>empty(alltrim(Chrtran(mystring,"1234567890"," ")))
>Returns .T. if all numbers
-michael

My brain hurt like a warehouse, it had no room to spare, I had to cram so many things to store everthing in there. - David Bowie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform