* currency support

* dropped fixed16/32 support
This commit is contained in:
peter 2003-12-08 17:45:00 +00:00
parent dd8f11e8e1
commit bbf9d2f9c6

View File

@ -14,8 +14,11 @@
**********************************************************************} **********************************************************************}
type type
{ See symdefh.inc tfloattyp } { See symconst.pas tfloattype }
treal_type = (rt_s32real,rt_s64real,rt_s80real,rt_c64bit,rt_f16bit,rt_f32bit); treal_type = (
rt_s32real,rt_s64real,rt_s80real,
rt_c64bit,rt_currency,rt_s128real
);
{ corresponding to single double extended fixed comp for i386 } { corresponding to single double extended fixed comp for i386 }
Procedure str_real (len,f : longint; d : ValReal; real_type :treal_type; var s : string); Procedure str_real (len,f : longint; d : ValReal; real_type :treal_type; var s : string);
@ -226,21 +229,23 @@ begin
{ correction used with comparing to avoid rounding/precision errors } { correction used with comparing to avoid rounding/precision errors }
roundCorr := (1/exp((23-6-3)*ln(10))); roundCorr := (1/exp((23-6-3)*ln(10)));
end; end;
rt_f16bit : rt_currency :
begin begin
maxlen:=16; { Different in TP help, but this way the output is the same (JM) }
minlen:=8; maxlen:=25;
explen:=4; minlen:=10;
explen:=0;
{ correction used with comparing to avoid rounding/precision errors } { correction used with comparing to avoid rounding/precision errors }
roundCorr := (1/exp((16-4-3)*ln(10))); roundCorr := (1/exp((25-6-3)*ln(10)));
end; end;
rt_f32bit : rt_s128real :
begin begin
maxlen:=16; { Different in TP help, but this way the output is the same (JM) }
minlen:=8; maxlen:=25;
explen:=4; minlen:=10;
explen:=6;
{ correction used with comparing to avoid rounding/precision errors } { correction used with comparing to avoid rounding/precision errors }
roundCorr := (1/exp((16-4-3)*ln(10))); roundCorr := (1/exp((25-6-3)*ln(10)));
end; end;
end; end;
{ check parameters } { check parameters }
@ -448,7 +453,11 @@ end;
{ {
$Log$ $Log$
Revision 1.11 2003-10-26 16:56:44 jonas Revision 1.12 2003-12-08 17:45:00 peter
* currency support
* dropped fixed16/32 support
Revision 1.11 2003/10/26 16:56:44 jonas
* fixed web bug 2643 * fixed web bug 2643
Revision 1.10 2003/09/06 17:06:59 florian Revision 1.10 2003/09/06 17:06:59 florian