Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF Statement Doesn't Seem to be Working
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00123956
Message ID:
00124390
Views:
28
>Yes, but recalling the original thread, it says 'Even if the fields Late, Absent, & Early contain zeros (0.00)...', thus, assuring us that the physical value sitting in the disk is really 0.00.
>
>Could numeric field that has 2 decimals can physically contain 0.00000001? Just asking...

Jess,

yes it can. The number in the dbf is stored as a character string but it is converted to an 8 byte floating point number when in memory. If there is a rounding error between the memory variable and the way Fox converts the numeric field you certainly can get 0.00000001 from a numeric field with 2 decimal places that show as 0.00. That's why I use integer fields whenever possible.

The proof is that the IF statement didn't work, meaning either the equal sign is broken or the two numbers are not the same value.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform