소스 검색

rtl: simplified FormatNumberCurrency

mattias 6 년 전
부모
커밋
67afd2d765
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      packages/rtl/sysutils.pas

+ 1 - 3
packages/rtl/sysutils.pas

@@ -1636,16 +1636,14 @@ Function FormatNumberCurrency(const Value : Currency; Digits : Integer; DS,TS :
 Var
   Negative: Boolean;
   P : Integer;
-  D : Double;
 
 Begin
-  D:=Value;
   //  Writeln('Value ',D);
    If Digits = -1 Then
      Digits := CurrencyDecimals
    Else If Digits > 18 Then
      Digits := 18;
-   Str(D:0:Digits, Result);
+   Str(Value:0:Digits, Result);
    // Writeln('1. Result ',Result,' currencystring : ',CurrencyString);
    Negative:=Result[1] = '-';
    if Negative then