PRB: Setting Decimals to 10 or More Creates Incorrect Result (193415)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q193415 SYMPTOMS
With Decimals set to 10 or greater, the SUM() function returns results that
do not match the lesser decimal equivalent.
RESOLUTION
Here are two potential workarounds depending on the application's needs:
- Use the Currency field datatype where possible.
-or-
- Use the Round() function when comparing a value to another with decimal
places set to > 9.
Example
IF Round(m.x3,2) <> 300.03
? "Mismatch 3"
ENDIF
STATUS
Microsoft is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 12/11/1999 |
---|
Keywords: | kbprb KB193415 |
---|
|