Autor Beitrag
moloch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Mi 18.08.04 08:39 
Hallo Leute,
ich definiere so ein dynamisches Array:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
TBeispielRec = record
  Spalte1 : Integer;
  Spalte2 : Integer;
end;

TBeispielArr = array of TBeispielRec;

var
  BeispielArr : TBeispielArr;



So die Zeilen in diesem Array sind jetzt dynamisch. Wie kriege ich es hin das auch die Spalten dynamisch sind?

mfg
moloch

Moderiert von user profile iconKlabautermann: Delphi-Tags hinzugefügt.
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mi 18.08.04 08:53 
So:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
type
  TBeispielArray = array of array of Integer;

var
  BeiArr: TBeispielArray;


// Und so machst Du ein 20x20 Felder großes Array draus:
  SetLength(BeiArr, 20);
  for i := 0 to 19 do
    SetLength(BeiArr[i], 20);

// Zugriff auf Spalte 13 in Zeile 15:
  BeiArr[14][12] := 4;


raziel

_________________
JSXGraph
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Mi 18.08.04 09:24 
Ok ich denke ich verstehe,
danke für deine hilfe

mfg
moloch