Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG ? BUG ? BUG ?
Message
 
To
11/08/1999 05:36:20
Amit Abhangrao
Charmi Software Exports
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Conferences & events
Miscellaneous
Thread ID:
00252396
Message ID:
00252403
Views:
10
>Hi All,
>
> Try the following, and see the result.
>
> Set deci to 2
> MyNumber = 133.46+ 133.46+ 133.46+ 133.46+ 133.46
> ** The above total comes to 667.30
> MyResult = MyNumber - 667.30
> ?Empty(MyResult) && Check whether value is empty or not
>
> If you see the value of Empty(MyResut). By the above calculation, it should come to .T. BUT it will give .F.
>
> ?MyResult = 0
>
> This will come to .t.
>
> (If you see decimals the result is 667.300000000000100000)
>
>HELP
>
>Amit


you should use the round() function when dealing with fractional numbers to avoid this problem
Bruce Strom

Prayer of St Ephrem:
O Lord and Master of My Life,
Take from me the spirit of sloth, meddling, ambition and vain talk.
But give me a spirit of prudence, humility, patience and love.
Yes Lord and King grant me to see my own sins and faults
and not judge my brother.
For You are Blessed Forever and Ever. Amen.
Previous
Reply
Map
View

Click here to load this message in the networking platform