Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing a Character field for Numeric Data'
Message
 
 
À
28/07/2009 14:25:03
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:
01415137
Vues:
55
>>
>>x = '0.8'
>>? TYPE(x)   &&returns "N"
>>? VARTYPE(x)   &&returns "C"
>>
>
>The only thing I would add that has gotten me in the past is to check for 'E' and 'X' containing in the field. 1e9 will say it's a number because e gets defined by foxpro as exponent and 0x90 is considered hex and foxpro evaluates it to a number.

Check the thread I pointed Yossi for more thorough discussion on the problem.

You can have + - */ etc. (any expression that will evaluate as a number).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform