Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing a Character field for Numeric Data'
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01415119
Message ID:
01415150
Vues:
44
>>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!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform