Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Will SET PRECISION fix odd math?
Message
De
24/02/2006 11:28:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
24/02/2006 11:23:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Novell 4.x
Database:
Visual FoxPro
Divers
Thread ID:
01098837
Message ID:
01098930
Vues:
25
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform