Autor Beitrag
seppel86
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 54



BeitragVerfasst: Sa 05.03.05 15:47 
Hi, hab folgendes Problem. Hab eine Klasse mit consturctor erstellt. Wenn kompiliere krieg ich immer die Fehlermeldung "or" expected but CONSTRUCTOR found. Wo liegt mein Fehler??

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
type TString=class(TObject);
        var s:string;
        public
                constructor Create(Aowner: Tcomponent);
                destructor Destroy;
                procedure strang(ps:string);
end;


Danke für die Hilfe,
Mfg, Seppel86

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
wdbee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 628
Erhaltene Danke: 1



BeitragVerfasst: Sa 05.03.05 15:56 
seppel86 hat folgendes geschrieben:

Wo liegt mein Fehler??


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
type TString=class(TObject); // Hier, das Semikolon ist zuviel
        var s:string;
        public
                constructor Create(Aowner: Tcomponent);
                destructor Destroy;
                procedure strang(ps:string);
end;


Ach und TString als Name ist auch nicht der Hit: TMyString wäre sicher besser!

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
seppel86 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 54



BeitragVerfasst: Sa 05.03.05 15:59 
jut. Danke für die hilfe.
UC-Chewie
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 531

WinXP
D5 Ent
BeitragVerfasst: Sa 05.03.05 18:10 
Und das "var" hat dort auch nix zu suchen.

_________________
Egal wie dumm man selbst ist, es gibt immer andere, die noch dümmer sind