Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing a Character field for Numeric Data'
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01415119
Message ID:
01415150
Views:
46
>>So then the VFP help file is wrong (gasp!) when it says in the entry on TYPE():
>>
>>"VARTYPE( ) is similar to the TYPE( ) function, but VARTYPE( ) is faster and does not require quotation marks ("") to enclose the specified expression."
>>
>>Consider:
>>
>>
>>x = '0.8'
>>? TYPE(x)   &&returns "N"
>>? VARTYPE(x)   &&returns "C"
>>
>
I don't see that as being wrong. TYPE requires the data you're evaluating to be enclosed in a string, whereas VARTYPE does not (i.e. VARTYPE(0.8) = "N").


I stand corrected!
Previous
Reply
Map
View

Click here to load this message in the networking platform