Autor Beitrag
hassedelphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WIN XP
D7 Enterprise
BeitragVerfasst: So 17.08.03 12:07 
hi

ich habe ein eigenen datentyp erstellt. in diesem datentyp sollen nun wiederrum von mir erstellte datentypen vorkommen. meine idee wäre
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
type tiw1 = record
         name : integer;
         ...
         tiw2 : record;
end;

type tiw2 = record
          zahl : integer;
          ...
end;


funtzt aber nicht. kann jemand helfen?

Moderiert von user profile iconTino: Titel geändert.

_________________
you're not be able to help, that you're an human
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: So 17.08.03 12:11 
So kann es auch nicht funktionieren. Du musst als Typ des Feldes in dem ersten Record den Namen des andere Records angeben, also etwa so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
type Ttiw1 = record 
         name : integer; 
         ... 
         tiw2 : Ttiw2; 
end

type Ttiw2 = record 
          zahl : integer; 
          ... 
end;
hassedelphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WIN XP
D7 Enterprise
BeitragVerfasst: So 17.08.03 12:31 
THX :D wärt's gleich ausprobieren

_________________
you're not be able to help, that you're an human
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: So 17.08.03 13:11 
Wenn man dann noch die Deklaration des zweiten Record vor den ersten verschiebt, kann man das auch kompilieren.

_________________
Ist Zeit wirklich Geld?
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: So 17.08.03 13:59 
AndyB hat folgendes geschrieben:
Wenn man dann noch die Deklaration des zweiten Record vor den ersten verschiebt, kann man das auch kompilieren.

Stimmt, irgendwie mach ich das aber auch bis zum Kompilieren immer falsch :oops: