Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INT(MOD(nNumber,2)) problem
Message
De
15/10/2002 08:20:10
 
 
À
14/10/2002 17:07:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00711105
Message ID:
00711266
Vues:
9
this is true.
After many hours of working with this, before thinking of asking here, and then putting the service pack 5 on one of our machines to see if that was the problem, we finally found that the problem was not with that actual line, but a line where we convert CTOT() and then do addition and subtraction on the results.

Thanks for the help.

>I get the same results as Sylvain (albeit VFP6 SP5 on W2K SP3). Most likely >the values of your variable are not precisely 20 and 35 respectively. Bear >in mind that floating point math is not exact (I believe VFP gives 15 sig >figs) and that repeated/iterated calculations can cause unexpected errors >to creep in.

>You might be able to work around the problem by using the ROUND() or INT() >function:
>MOD(ROUND(lnchecktme1, 2), 2)
>MOD(INT(lnchecktme1), 2)
>Regards. Al
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform