Autor Beitrag
ebs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Di 29.03.05 12:21 
Hallo,
ich habe davon gehört, dass es mehrdiminsionale Felder unter Delphi gibt. Kann mir einer Sagen, was dass ist, und wie ich sowas dann aufrufe?
Derzeitig liegen meine Zahlen so ab:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
List[0]:= 25
List[1]:= 29
.
.


Vielen Dank!

Moderiert von user profile iconAXMD: Delphi-Tags hinzugefügt.
Moderiert von user profile iconAXMD: Titel (hinsichtlich Rechtschreibung) korrigiert
Moderiert von user profile iconraziel: Topic aus Dateizugriff verschoben am Di 29.03.2005 um 14:30
meolus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78

Gentoo, Debian, Win7 64-bit, WinXP
Delphi 2006 Prof., Delphi 2005 PE
BeitragVerfasst: Di 29.03.05 12:26 
Wie der Name schon sagt, werden mehrdiminsionale Feldern, Daten mehrdiminsionale gespeichert!

"1D":
ausblenden Delphi-Quelltext
1:
2:
MyArray: Array of Integer;
Zugriff: MyArray[0]


"2D":
ausblenden Delphi-Quelltext
1:
2:
MyArray: Array of Array of Integer;
Zugriff: MyArray[0,0]


"3D":
ausblenden Delphi-Quelltext
1:
2:
MyArray: Array of Array of Array of Integer;
Zugriff: MyArray[0,0,0]


usw.

Das zwei dimensionale wäre z.B. eine richtige Tabelle...

MfG Meolus

Moderiert von user profile iconAXMD: Delphi-Tags hinzugefügt.

_________________
Real programmers don't comment their code;
if it was hard to write, it should be hard to read.
Backslash
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 202

WIN XP
Delphi 5 Ent, Delphi 2005 Prof
BeitragVerfasst: Di 29.03.05 12:27 
Kleiner tip: Schau mal in der Delphi-Hilfe unter "Arrays" nach.

Einfache mehrdimensionale Felder erstellst du so (Beispiel):

ausblenden Delphi-Quelltext
1:
2:
3:
var
  Dim2Array[0..50, 0..20] of Integer;
  Dim3Array[0..55, 0..10, 0..2] of Double;


Moderiert von user profile iconAXMD: Code- durch Delphi-Tags ersetzt.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Di 29.03.05 12:52 
An alle, die in diesem Thread gepostet haben: bitte beim nächsten Mal Delphitags verwenden. Wie das geht steht in der Hilfe

Danke euch :)
AXMD