Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG ? BUG ? BUG ?
Message
 
À
11/08/1999 05:36:20
Amit Abhangrao
Charmi Software Exports
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Conférences & événements
Divers
Thread ID:
00252396
Message ID:
00252403
Vues:
11
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform