From 3e098316fde811eaec9c9812f42a2dfd7f0015b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Van=20Canneyt?= Date: Mon, 29 Jul 2024 20:48:16 +0200 Subject: [PATCH] * Handle tkFloat in TValue.ToString --- packages/rtl-objpas/src/inc/rtti.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/rtl-objpas/src/inc/rtti.pp b/packages/rtl-objpas/src/inc/rtti.pp index da733dc352..6d96c7d341 100644 --- a/packages/rtl-objpas/src/inc/rtti.pp +++ b/packages/rtl-objpas/src/inc/rtti.pp @@ -4032,6 +4032,7 @@ function TValue.ToString: String; var Obj : TObject; + begin if IsEmpty then Exit('(empty)'); @@ -4040,6 +4041,7 @@ begin tkUString : result := AsUnicodeString; tkSString, tkAString : result := AsAnsiString; + tkFloat : Str(AsDouble:12:4,Result); tkInteger : result := IntToStr(AsInteger); tkQWord : result := IntToStr(AsUInt64); tkInt64 : result := IntToStr(AsInt64); @@ -4059,7 +4061,7 @@ begin Result:=''; end else - result := ''; + result := ''; end; end;