Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric or string ??
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
00985094
Message ID:
00985107
Views:
44
>Sorry, I forgot to mention that the input of my textbox is always character.
>So, when I put in 123 the value of my textbox is '123' and then I take the numeric value with the val() function. That's simple. Problem begains when the user puts in '123 piano'. As the val() function returns 123.00, the program thinks he's dealing with only digits, which is obviously not true. Is there an easy way (without having to check each character seperately)to detect that the input exists of digits and characters ??

Hans,

Yuri provided you with an answer
IF TYPE(textbox.value) = "N"
  * number
ELSE
  * character
ENDIF
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform