Autor Beitrag
Basti
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 345

Windows Vista
D2005 Pers, D7 Pers
BeitragVerfasst: So 02.01.05 20:56 
Um es kurz zu machen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  TKugel = class
  private
    function CheckKollision(Kugeln:TKugelArray; CheckIndex:integer):Boolean;
  public
    property kollidiert: Boolean read CheckKollision; // => [Fehler] u_TKugel.pas(29): Inkompatible Typen
  end;


Ich wäre euch sehr verbunden, wenn ihr meine Blödheit beim Namen nennt :roll:

_________________
Der Computer ist die logische Weiterentwicklung des Menschen: Intelligenz ohne Moral.
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: So 02.01.05 21:14 
Basti hat folgendes geschrieben:
Um es kurz zu machen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  TKugel = class
  private
    function CheckKollision(Kugeln:TKugelArray; CheckIndex:integer):Boolean;
  public
    property kollidiert: Boolean read CheckKollision; // => [Fehler] u_TKugel.pas(29): Inkompatible Typen
  end;


Ich wäre euch sehr verbunden, wenn ihr meine Blödheit beim Namen nennt :roll:


Gerne: deine Funktion dürfte keine Parameter haben.

AXMD
I.MacLeod
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 109



BeitragVerfasst: So 02.01.05 21:48 
Da musst du deiner Property Indizes verpassen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  TKugel = class
  private
    function CheckKollision(const Kugeln: TKugelArray; const CheckIndex: integer): Boolean;
  public
    property kollidiert[const Kugeln: TKugelArray; const CheckIndex: integer]: Boolean read CheckKollision; // => [Fehler] u_TKugel.pas(29): Inkompatible Typen
  end;


IMHO wäre das aber besser als einfache Funktion gelöst.