Added parenthesis in TBigInt.ToString for negative values

This commit is contained in:
Stefan Müller 2024-05-23 21:08:01 +02:00
parent cfb74da86b
commit 18f432bdfe
1 changed files with 3 additions and 1 deletions

View File

@ -532,7 +532,7 @@ var
i: Integer;
begin
if FIsNegative then
Result := '-'
Result := '(-'
else
Result := '';
for i := 0 to Length(FDigits) - 2 do
@ -540,6 +540,8 @@ begin
Result := Result + IntToStr(FDigits[Length(FDigits) - 1]);
for i := 0 to Length(FDigits) - 2 do
Result := Result + ')';
if FIsNegative then
Result := Result + ')'
end;
class function TBigInt.FromInt64(const AValue: Int64): TBigInt;