mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 11:49:23 +02:00
* fixed fpc_ShortStr_Currency.
git-svn-id: trunk@5848 -
This commit is contained in:
parent
37b9258431
commit
a2f4c7fd2a
@ -439,23 +439,22 @@ begin
|
||||
else
|
||||
begin
|
||||
{ fixed format }
|
||||
{ Currency have only 4 digits in fractional part }
|
||||
Inc(reslen, sign);
|
||||
if tlen < 4 then
|
||||
{ prepending fractional part with zeroes }
|
||||
while tlen < 5 do
|
||||
begin
|
||||
r:=tlen - f;
|
||||
point:=tlen - 1;
|
||||
end
|
||||
else
|
||||
Inc(reslen);
|
||||
Inc(tlen);
|
||||
buf[tlen]:='0';
|
||||
end;
|
||||
{ Currency have 4 digits in fractional part }
|
||||
r:=4 - f;
|
||||
point:=f;
|
||||
if point <> 0 then
|
||||
begin
|
||||
r:=4 - f;
|
||||
point:=f;
|
||||
if point <> 0 then
|
||||
begin
|
||||
if point > 4 then
|
||||
point:=4;
|
||||
Inc(point);
|
||||
end;
|
||||
if point > 4 then
|
||||
point:=4;
|
||||
Inc(point);
|
||||
end;
|
||||
Dec(reslen,r);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user