mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 10:39:09 +02:00
* Handle tkFloat in TValue.ToString
This commit is contained in:
parent
303c0378e9
commit
3e098316fd
@ -4032,6 +4032,7 @@ function TValue.ToString: String;
|
|||||||
var
|
var
|
||||||
Obj : TObject;
|
Obj : TObject;
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if IsEmpty then
|
if IsEmpty then
|
||||||
Exit('(empty)');
|
Exit('(empty)');
|
||||||
@ -4040,6 +4041,7 @@ begin
|
|||||||
tkUString : result := AsUnicodeString;
|
tkUString : result := AsUnicodeString;
|
||||||
tkSString,
|
tkSString,
|
||||||
tkAString : result := AsAnsiString;
|
tkAString : result := AsAnsiString;
|
||||||
|
tkFloat : Str(AsDouble:12:4,Result);
|
||||||
tkInteger : result := IntToStr(AsInteger);
|
tkInteger : result := IntToStr(AsInteger);
|
||||||
tkQWord : result := IntToStr(AsUInt64);
|
tkQWord : result := IntToStr(AsUInt64);
|
||||||
tkInt64 : result := IntToStr(AsInt64);
|
tkInt64 : result := IntToStr(AsInt64);
|
||||||
@ -4059,7 +4061,7 @@ begin
|
|||||||
Result:='<Nil>';
|
Result:='<Nil>';
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
result := '<unknown kind>';
|
result := '<unknown kind: '+GetEnumName(System.TypeInfo(TTypeKind),Ord(Kind))+'>';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user