mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 10:39:09 +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
|
else
|
||||||
begin
|
begin
|
||||||
{ fixed format }
|
{ fixed format }
|
||||||
{ Currency have only 4 digits in fractional part }
|
|
||||||
Inc(reslen, sign);
|
Inc(reslen, sign);
|
||||||
if tlen < 4 then
|
{ prepending fractional part with zeroes }
|
||||||
|
while tlen < 5 do
|
||||||
begin
|
begin
|
||||||
r:=tlen - f;
|
Inc(reslen);
|
||||||
point:=tlen - 1;
|
Inc(tlen);
|
||||||
end
|
buf[tlen]:='0';
|
||||||
else
|
end;
|
||||||
|
{ Currency have 4 digits in fractional part }
|
||||||
|
r:=4 - f;
|
||||||
|
point:=f;
|
||||||
|
if point <> 0 then
|
||||||
begin
|
begin
|
||||||
r:=4 - f;
|
if point > 4 then
|
||||||
point:=f;
|
point:=4;
|
||||||
if point <> 0 then
|
Inc(point);
|
||||||
begin
|
|
||||||
if point > 4 then
|
|
||||||
point:=4;
|
|
||||||
Inc(point);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
Dec(reslen,r);
|
Dec(reslen,r);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user