The main advantage of not storing the decimal, is being able to easily
display a precision value any way you want. We do this (4-digit precision)
for sale price calculations(cost * markup). The only drawback is making sure
you keep all the values, for a specific record, in the same decimal length.
On the other hand, you could store the masking length for each value, in a
relative sub-value. I dunno why you'd wanna do that, though.

MD (Decimal Mask)
or
MD (Decimal Output) (Decimal Mask)

A=1.01643452
B=ICONV(A,"MD8") ; 101643452
C=OCONV(B,"MD28"); 1.02
D=OCONV(B,"MD48"); 1.0165
E=OCONV(B,"MD68"); 1.016436
F=OCONV(B,"MD8"); 1.0164352

Forgive me if my rounding logic is incorrect. I can't remember if MD rounds
up, if the next digit is not zero. Maybe some more caffeine would help.

Glen
http://picksource.com

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Shawn Waldie
> Sent: Thursday, August 26, 2004 4:47 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [U2] Precision question...
>
>
> Since storage space is relatively cheap these days, what's the advantage
> of storing numbers without decimal points?  Or is that not even the
> issue?
>
> -----Original Message-----
> From: Allen E. Elwood (CA) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 26, 2004 1:46 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [U2] Precision question...
>
>
> Ahh...apparently the system you work with is actually storing the
> decimal point.  The systems I've worked with do not store the actual
> decimal point, so therefore the MD82 dealy-bob wouldn't be applicable.
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to