Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ROUND()
Message
 
 
À
08/03/2000 12:10:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00342568
Message ID:
00343344
Vues:
26
>I don't agree that the ROUND() function should disregard the decimals setting, as this can make a big difference. If I wanted the result of my sum to be 9.5, and I want to round it off, then I don't think it should be changed to 9.46, and then rounded off.
>
Round() doesn't respect the Decimal setting because it has its own which over-rides the environment setting.

To All,
Try the following:
set decimal to 16
? 7/74*100 && result 9.4594594594594600
set decimal to 1
n = 7/74*100
? n && result 9.5
? round(n,0) && what do you get? my result 9

This is the problem Kevin has been experiencing and I haven't caught on until now. This is a BUG!!

It appears the value is not being stored to the memory variable, but the expession itself. Then whenever you need it afterward, VFP reevaluates it.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform