Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Will SET PRECISION fix odd math?
Message
From
24/02/2006 11:28:56
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/02/2006 11:23:35
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Novell 4.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01098837
Message ID:
01098930
Views:
26
I mean if you can preestimate maximum precision beforehand just use the max. Or use currency so you have a trustable value for calculations.
Cetin

>Hi Cetin,
>
>Thanks for the feedback. I originally wrote this code a few years back & I am just now revisiting that project. The idea is that the number you're getting is user input, or import from a file with an unknown number of decimal places (if any), so I could not define lnSignificantdecimals up front. Unless I am missing the true meaning behind your post... if so, please explain.
>
>>
>>That creativity is not foxbased < g >.
>>
>>nValue = 234.8234721345
>>cValue = trim(trans(m.nValue))
>>? iif(occurs('.',m.cValue),len(m.cValue)-at('.',m.cValue),0)
>>
>>Why don't you simply use:
>>lnSignificantdecimals = 10
>>create table ... (myMathField b(m.lnSignificantDecimals), ...)
>>(or Y)
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform