Autor Beitrag
martin300
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 186
Erhaltene Danke: 2



BeitragVerfasst: Di 22.04.08 09:24 
Hallo,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
Bestand = class(TObject)
.....
function get(seriennummer: String) : Instrument;
...


Instrument = class(TObject)


Würde gerne die Klasse Instrument nach der Klasse Bestand im Quellcode platzieren.
Fehler: Bezeichner neu deklariert

Wird die Reihenfolge geändert dh. zuerst Instrument und später Bestand ist alles ok.
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 22.04.08 09:29 
Hast du die Klasse Instrument eventuell in der Klasse Bestand oder hast du eine gleichnamige Klasse in einer eingebundenen Unit deklariert?

AXMD
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 22.04.08 09:39 
Eine Klassen-Forward-Deklaration könnte hier helfen.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
martin300 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 186
Erhaltene Danke: 2



BeitragVerfasst: Di 22.04.08 10:11 
Danke.
Lösung:
Instrument = class;