Autor Beitrag
Green
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: Di 16.05.06 20:35 
also mein problem ist das ich ein array hab mi den feldern [x..z] und jetzt will ich das das feld y als array definiert wird, der rest aber als strings oder was auch immer bleibt...

in php is das einfach:
ausblenden Quelltext
1:
2:
3:
$array = array();

$array[y] = array();


jetzt kann ich mit $array[1] = 'asas'; string zuweisen und mit $array[y][1] = 'asdasd'; aich einen string zuweisen,
wie aber geht das in delphi?

Struktur (zur verdeutlichung)

Array1
--[0] string;
--[1] string;
--[2] string;
--[y] Array2
----[0] string;
----[1] string;
----[2] string;
----[3] string;
--[5] string;
--[6] string;
--[7] string;


mfG Green
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Di 16.05.06 22:41 
Wie wärs mit einem Array of Pointer?
Dann kannst du an jeden Eintrag beliebiges Zeug anhängen, du musst hinterher nur wissen, was da dran hängt.

Gruß alias5000

_________________
Programmers never die, they just GOSUB without RETURN
Green Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: Di 16.05.06 22:49 
wie konkret würde das aussehen? also an meinem Beispiel?
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Mi 17.05.06 05:38 
Hallo,

ich habe noch nie mit soetwas gearbeitet , aber das >riecht< nach Typ TVArData.
Delphi-Hilfe
www.marcocantu.com/e...German/ch10varde.htm
de.wikipedia.org/wiki/Variant_(Datentyp)
hier das wohl passendste:
www.gekko-software.nl/Delphi/art08.htm

Gruss Horst