Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whole numbers
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00322702
Message ID:
00322719
Views:
22
>Cemal,
>
>Have a look at the currency data type. Even at your exchange rate, you can still store 1.6 thousand million US$. The documentation says that the largest currency value is 922,337,203,685,477.5807. If you divide that by 550,000 you still get 1,676,976,733.9736
>

As long as you add and subtract large currency types, you're OK. If he's really talking numbers that big he showed a problem with 18 digits to the left of the decimal, dropping precision after 16 decimal positions, OK, but multiplication/division operations on currency values this large are not reliable. Percentages used in annual interest calculations will exceed the precision of the representation. Daily calculations make your life unpleasant at best.

Don't try to shoehorn in accounting. VFP is the wrong tool here. I'd gladly give up VFP for a nice, big 12-16 byte packed BCD data type and not worry about rounding. YMMV. I go to jail if my accounting is wrong. I don't want to end up in a Turkish jail because I made a bad choice of tool.

>By the way, the largest value I could get VFP to accept as a currency type (using NTOM()) was 922,337,203,685,477.5625
>
>Cheers,
>
>Andrew
>
>>
>>Thanks Ed:
>>The problem is that inflation is very high in turkey.
>>1 dollar is 550,000 Turkish liras.
>>Thanks again.
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
Next
Reply
Map
View

Click here to load this message in the networking platform