Autor Beitrag
der_zaehe
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 317

WinXP SP2
D6 Pers, D2005 Prof, VS2005
BeitragVerfasst: Fr 09.06.06 16:11 
Hi,
ich habe gerade ein sehr merkwürdiges Problem: Bei
ausblenden Delphi-Quelltext
1:
2:
3:
while (Datensaetze[i] <> meinDsatz) do
begin
...

erhalte ich immer die Fehlermeldung
ausblenden Quelltext
1:
[Error] WBKlassen.pas(55): Incompatible types					


Datensaetze ist ein array of Datensatz, meinDsatz ist auch von Typ Datensatz. Aber was ist da faul? Ich vergleiche doch zweimal den selben Datentyp. Leider kann ich den Fehler nicht finden, weil ich schon vor längerer Zeit auf C# umgestiegen bin und obige Zeile Teil eines Programms ist, bei dem ich einem Freund helfe.

Danke schon mal für die Hilfe,
Der Zaehe.

_________________
[inspirationslos]
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Fr 09.06.06 16:15 
Etwas mehr Quelltext, insbesondere die Deklarationen wären hilfreich...
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 09.06.06 16:15 
Der Fehler sagt ja aus, das die beiden Variablen verschiedene Typen haben. Poste doch mal die Variablendeklaration.

_________________
Markus Kinzler.


Zuletzt bearbeitet von mkinzler am Fr 09.06.06 16:20, insgesamt 1-mal bearbeitet
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Fr 09.06.06 16:18 
ja, dann ist das so... aber wenn man ihm helfen soll, dann braucht man etwas mehr infos ^^
der_zaehe Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 317

WinXP SP2
D6 Pers, D2005 Prof, VS2005
BeitragVerfasst: Fr 09.06.06 19:41 
Sry, ich war WM-Spiel schauen. ;)
Hier die Deklaration:

ausblenden Delphi-Quelltext
1:
2:
3:
Liste = class
    Datensaetze: array of Datensatz;
    ...

ausblenden Delphi-Quelltext
1:
2:
3:
procedure Liste.loeschen(meinDsatz: Datensatz);
var
  ...


Vielleicht hilft euch das ja.

_________________
[inspirationslos]
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 09.06.06 20:05 
Komisch! Wie ist Datensatz definiert?

_________________
Markus Kinzler.