Autor Beitrag
nepleurepas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

Win XP

BeitragVerfasst: Mi 25.04.07 16:47 
Hallo,
ist es möglich, ein mehrdimensionales dynamisches record in delphi zu benützen?
Wenn nein, ist es möglich ein eindimensionales dynamisches record in delphi zu benutzen?
Ist es möglich ein mehrdimensionales dynamisches array zu benutzen?

Danke für antworten.

gruß Stefan
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 25.04.07 16:52 
ja
ausblenden Delphi-Quelltext
1:
2:
3:
4:
TMyRecord = record
  A,B,C,D,E,F: Integer;
end;
TMyArray = array of array of array of array of TMyRecord;

Reicht 4D?

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 25.04.07 16:53 
Und was spricht gegen einfaches ausprobieren :?:

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Mi 25.04.07 16:54 
Dynamische Records gibts afaik nicht in Delphi, dynamische Arrays hat kroko ja schon gepostet.

_________________
Bravery calls my name in the sound of the wind in the night...
nepleurepas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

Win XP

BeitragVerfasst: Mi 25.04.07 16:59 
user profile iconKroko hat folgendes geschrieben:
ja
ausblenden Delphi-Quelltext
1:
2:
3:
4:
TMyRecord = record
  A,B,C,D,E,F: Integer;
end;
TMyArray = array of array of array of array of TMyRecord;

Reicht 4D?


Das ist mir jetzt nicht ganz klar. Kannst du das etwas erläutern? Vllt am bsp eines zweidimensioneln records?

gruß Stefan
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 25.04.07 17:09 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
TMyRecord = record
  A,B,C,D,E,F: Integer;
end;
TMyArray = array of array of TMyRecord;

var
  A: TMyArray;

  SetLength(A,5,10); // reserviert den Speicher für ein 5 x 10 Array
  Finalize(A); // gibt den Speicher wieder frei
  A[2,3].F := 100//setzt einen Wert

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!