Autor Beitrag
Danny W.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: Fr 01.12.06 12:00 
Hallo,

bislang kannte ich ehrlich gesagt nur

ausblenden Delphi-Quelltext
1:
zahl : array[1..20] of integer;					


Ich wusste mal wie man es dynamischer machen kann.. z.B. anstatt Zahlen, Variablen ensetzen..und genau das brauche ich..
Mein ziel ist es ein Array zu erstellen, das soviele Items hat, wie eine bestimmte Ini-Datei zeilen lang ist

ausblenden Delphi-Quelltext
1:
zahl : array[1..zahl] of integer;					


Problem bei der Geschichte ist, das ich zahl im OnCreate der Form initialisiere und den richtigen Wert zuweise. Dann spinnt das Array natürlich rum und sagt, es hat keinen wert :/ Ich könnte "Zahl" ja auch als konstante deklarieren. Dann bekomme ich den wert ja aber nicht sauber hin den ich durch das auslesen der ini bekomme.


Moderiert von user profile iconChristian S.: Topic aus VCL (Visual Component Library) verschoben am Fr 01.12.2006 um 14:41

_________________
"Ich find den Fehler nicht. Der Artist wird immer als "Syntax Error" gezeigt :("
"Ach verdammt, der Artist heißt wirklich "Syntax Error" xD"
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 01.12.06 12:12 
Moin!

Suche in: Delphi-Forum, Delphi-Library DYNAMISCHES ARRAY ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 01.12.06 13:36 
ausblenden Delphi-Quelltext
1:
zahl : array of integer;					


Die Größe setzt man dann mit
ausblenden Delphi-Quelltext
1:
setLength( zahl, Anzahl -1);					

_________________
Markus Kinzler.
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: Fr 01.12.06 14:29 
vielen dank :)

_________________
"Ich find den Fehler nicht. Der Artist wird immer als "Syntax Error" gezeigt :("
"Ach verdammt, der Artist heißt wirklich "Syntax Error" xD"