Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Will SET PRECISION fix odd math?
Message
From
24/02/2006 11:23:35
 
 
To
24/02/2006 11:11:46
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
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:
01098926
Views:
14
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
Paul A. Busbey
Victoria Insurance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform