Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Know is a variable containt letter
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00814615
Message ID:
00814633
Views:
14
Unfortunately Val() function won't work. Example val("12s2") returns 12,
It would be better to do something like
?!empty(chrtran("12s2","1234567890",""))
This returns .t. if any character is not a number but returns .f. if all characters are numbers. You may need to include a decimal point in the chrtran second parameter if decimal numbers are acceptable.

>Use VAL() function. VAL() returns zero if string is passed. You will have to check if the variable contains zero string. e.g. "0" or "0.00" etc.
>
>>i have three variable
>>
>>1- "bob"
>>2- "123"
>>3- "12s2"
>>
>>
>>i want to be able to know if these variable containt character
>>
>>so the result will be
>>
>>1- yes
>>2- no
>>3- yes
>>
>>thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform