Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET DECIMALS TO (Not working)
Message
From
08/12/2004 18:23:40
 
 
To
08/12/2004 18:02:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00967897
Message ID:
00967899
Views:
7
This message has been marked as the solution to the initial question of the thread.
>I need to set the number of decimals to 9, but it's not working, it always show 4 decimals after a division.
>
>SET DECIMALS TO 9
>MESSAGEBOX(STR(SET("Decimals"))) && it shows 9
>? lnCIF/lnFOB && This shows only 4 decimals, are being rounded
>
>What do i have to do to get 9 decimals.
>
>
>This code is in the method of a form.
>
>The weird thing is that if i add this code to the click event of the form, it works fine.
>
>Can someone helpme please.

Is one of your variables/fields a Money (currency) type? They're always 4 decimals. You can use MTON() to convert to a regular numeric.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform