![]() |
Wert eines TVarRec einer Array of const zuweisen
Ich will eine Wert aus einer array of const wieder als Parameter eines anderen array of const verwenden.
Ungefähr so:
Delphi-Quellcode:
Das erzeugt allerdings ein compiliert Fehler.
procedure a(x:array of const)
begin end; procedure b(x:array of const) begin a([x[0]]) end; Eine Lösung wäre jedes mal ne case anweisung auf VType
Delphi-Quellcode:
Da ich das allerdings sehr oft machen müsste wollte ich Fragen, ob es da evtl eine andere Lösung gibt.
case x[0].VType of
vtInteger: a([x[0].VInteger]); vtString: a([x[0].VString]); ... end; Vielen Dank |
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:02 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz