Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00401949
Message ID:
00401951
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform