Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function to retrieve Decimal Places
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01409350
Message ID:
01409429
Vues:
68
Hi Jerry,

> "FoxPro doesn't provide a direct way to check if variable is integer."

in VFP field types and value types are not the same. Whenever a field is stored in a variable or participates in an expression, VFP converts the field into a value. Integer, Double, numeric, etc. fields become just numeric. Memo fields become character, etc. That's why you see "strange" behavior such as:
Create Cursor demo(memofield M)
Insert into demo values (" ")
? Empty(memofield)  && .F.
? Empty(memofield+"")  && .T.
All integer, double and numeric fields are stored as numbers. In fact, there's even a value range difference for integer fields. 0x80000000 is a valid numeric value and a valid value for integer API parameters, but invalid for integer fields.
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform