Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rounding
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00401949
Message ID:
00401951
Vues:
17
>how come when I used: replace my_field with (my_field * .1)
>(numeric fields with a size of 5 and one decimal place)
>it rounded the result in some cases.
>
>for example, 25737 became 2574 instead of 2573.7 like i expected it would.
>on the other hand, 9805 became 980.5 like i wanted it to.
>

Because N(5,1) becomes

2573.7
12345
!!!!!!

with the result rounding up. The . occupies a position in the N field representation.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform