[fpc-devel] Freepascal 2.2.4rc1 released
Graeme Geldenhuys
graemeg.lists at gmail.com
Wed Jan 28 11:30:31 CET 2009
On Wed, Jan 28, 2009 at 12:07 PM, Graeme Geldenhuys
<graemeg.lists at gmail.com> wrote:
>
> lData.Rate := Query.FieldAsFloat['TAXRATE'];
FieldAsFloat translates to the underlying call to SqlDB as follows
function TtiQueryDataset.GetFieldAsFloat(const AName: string): extended;
begin
Result := FDataset.FieldByName(AName).AsFloat;
end;
Creating a simple test application as follows works fine on Linux and
Windows... So it doesn't seem to be a Format() issue.
=====================
var
s: single;
t: string;
begin
s := 14.00;
writeln('AValue = ', s);
t := Format('%.2f', [s]);
writeln('Formatted Avalue = ', t);
writeln('---');
end.
======================
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-devel
mailing list