![]() |
dynmic array initialisieren
ich möchte gerne ein dynmic array
Delphi-Quellcode:
initialisieren
TPolygon = array of TPoint
ich habe nur eine Lösung für statische arrays gefunden
Delphi-Quellcode:
const
Points : TPointArray = ((X: 1; Y: 1), (X:1; Y:2), (X:1; Y:1), (X:1; Y:1)) gibt es eine elegante Möglichkeit dies auch im Source code für dynamische Arrays zu erreichen ? |
AW: dynmic array initialisieren
Als const oder als var?
Als var geht (wobei man sich davon nicht das Assembly anschauen sollte, wenn man auf Hardcore Performance steht):
Delphi-Quellcode:
Als const geht nicht:
var
Points: TPolygon; begin Points := [Point(1, 1), Point(1,2), Point(1,1), Point(1,1)]; ![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:09 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