Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function to retrieve Decimal Places
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01409350
Message ID:
01409429
Views:
69
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
Previous
Reply
Map
View

Click here to load this message in the networking platform