Added parenthesis in TBigInt.ToString for negative values
This commit is contained in:
parent
cfb74da86b
commit
18f432bdfe
|
@ -532,7 +532,7 @@ var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
if FIsNegative then
|
if FIsNegative then
|
||||||
Result := '-'
|
Result := '(-'
|
||||||
else
|
else
|
||||||
Result := '';
|
Result := '';
|
||||||
for i := 0 to Length(FDigits) - 2 do
|
for i := 0 to Length(FDigits) - 2 do
|
||||||
|
@ -540,6 +540,8 @@ begin
|
||||||
Result := Result + IntToStr(FDigits[Length(FDigits) - 1]);
|
Result := Result + IntToStr(FDigits[Length(FDigits) - 1]);
|
||||||
for i := 0 to Length(FDigits) - 2 do
|
for i := 0 to Length(FDigits) - 2 do
|
||||||
Result := Result + ')';
|
Result := Result + ')';
|
||||||
|
if FIsNegative then
|
||||||
|
Result := Result + ')'
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TBigInt.FromInt64(const AValue: Int64): TBigInt;
|
class function TBigInt.FromInt64(const AValue: Int64): TBigInt;
|
||||||
|
|
Loading…
Reference in New Issue