Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IsNumeric - VFP analogue?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00307922
Message ID:
00308093
Views:
42
Jim,

My intention was opposite. I want that users type 5 digits only - no dots, commans, minus/plus, etc. Right now I changed my code this way:
if len(lcString)<>5 or !IsNumeric(lcString)
=messagebox(...)
return .f.
endif

where lcString is user's input (in editbox) and IsNumeric is George's function.




>>
>>Sorry for my prev. message, I haven't read yours carefully. '123 ' it's not the case, because I'm using alltrim, but -/+ does. But I can simply add
>>and !'-'$lcString or !'+'$lcString
>>
>>Right?
>Nadya,
>
>Or you could use the TYPE() function and it will work everytime without any special coding.
>
>lcVar = "123"
>TYPE(lcVar) = "N"
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform