Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty()??? Is this true!
Message
From
07/09/2004 15:10:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00940054
Message ID:
00940057
Views:
23
That's nothing new, but something that you must be aware of. Since decimal 'fractions' can not be directly converted into binary
numbers, they are converted to binary values following industry standards. That means that ANY calculation including decimals must be considered as being NOT 100% correct. This means that you have to be extra careful. In your example yiu will find that
? EMPTY(ROUND(x,2)) && True (I assume)
Also check SET DECIMALS in help.

>Check this out!
>Run this:
>
>x=199.07
>x=x - 185.27
>x = x  - 13.80
>?"---"    && Result
>?x        && Print 0.00
>?EMPTY(x) && Print .F.
>
>
>Anyone know why?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform