mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-16 16:59:01 +02:00
rtl: simplified FormatNumberCurrency
This commit is contained in:
parent
dbf97bddc2
commit
67afd2d765
@ -1636,16 +1636,14 @@ Function FormatNumberCurrency(const Value : Currency; Digits : Integer; DS,TS :
|
|||||||
Var
|
Var
|
||||||
Negative: Boolean;
|
Negative: Boolean;
|
||||||
P : Integer;
|
P : Integer;
|
||||||
D : Double;
|
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
D:=Value;
|
|
||||||
// Writeln('Value ',D);
|
// Writeln('Value ',D);
|
||||||
If Digits = -1 Then
|
If Digits = -1 Then
|
||||||
Digits := CurrencyDecimals
|
Digits := CurrencyDecimals
|
||||||
Else If Digits > 18 Then
|
Else If Digits > 18 Then
|
||||||
Digits := 18;
|
Digits := 18;
|
||||||
Str(D:0:Digits, Result);
|
Str(Value:0:Digits, Result);
|
||||||
// Writeln('1. Result ',Result,' currencystring : ',CurrencyString);
|
// Writeln('1. Result ',Result,' currencystring : ',CurrencyString);
|
||||||
Negative:=Result[1] = '-';
|
Negative:=Result[1] = '-';
|
||||||
if Negative then
|
if Negative then
|
||||||
|
Loading…
Reference in New Issue
Block a user