Subject Re: [IBO] Float truncation
Author Jason Wharton
Floats often are unable to express exact precision. Use a display format and
let the value do whatever. Otherwise, don't use float but instead scaled
numeric.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Leeway" <lee@...>
To: <IBObjects@yahoogroups.com>
Sent: Saturday, August 04, 2001 6:58 AM
Subject: [IBO] Float truncation


> I have a floating point field connected to a TIB_Edit
> I want to limit the field to 2 digits after the decimal point.
> How do I do this ?
> Can I limit the number of digits after the decimal point in the
> database itself ?
>
> I tried this
>
> QTIB_Art.FieldByName('EP_EXCL').AsFloat := StrToFloat(FloatToStrF
> (QTIB_Art.FieldByName('EP_EXCL').AsFloat,ffFixed,12,2));
>
> This does not work, is there a way to use a mask or what can I do ?
>
> Lee