General information
Category:
Coding, syntax & commands
Title:
SET DECIMALS has no affect in Visual FoxPro executable - tru
Environment versions
Network:
Windows 2000 Server
I have a legacy Visual FoxPro 6.0 application where I need to do a simple multiplication where one of the terms have more than 4 significant digits. I have tried the following code, but this has no affect whatsoever:
local nLabor as double
local nCaseMix as double
local nLaborComponent as double
set decimals to 8
nLabor = 0.76775
nCaseMix = 3807.07
nLaborComponent = nLabor * nCaseMix
At the Visual FoxPro command prompt, nLaborComponent will correctly be computed as 3186.25. When compiled to an executable, 3186.59 is the result (what you would get if nLabor were rounded to 0.7678).
Is there a way to address this in native Visual FoxPro? If not I will try to write a simple DLL to handle the basic arithmetic.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only