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



BeitragVerfasst: Di 01.06.04 16:34 
Hi,
ich habe eine Liste. Ich bin mit l.islast an die letzte stelle gerückt. kann ich den index davon in einer Integer variable speichern?

ausblenden Delphi-Quelltext
1:
p:=l1.islast;					

habs so ausprobiert. Bekomme nur die Meldung: incompatible types: integer and boolean;


Moderiert von user profile iconPeter Lustig: Topic aus Sonstiges verschoben am Di 01.06.2004 um 17:37
FaTaLGuiLLoTiNe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 200
Erhaltene Danke: 5

Windows 7, Windows 8.1
Delphi XE
BeitragVerfasst: Di 01.06.04 16:37 
IsLast ist wohl eine Methode vom Typ Boolean. Das kannst du in Delphi nicht ohne weiteres in einer Integer - Variablen speichern. Was du aber darin ablegen kannst, ist der Index des letzten Elements der Liste:
ausblenden Delphi-Quelltext
1:
p := l1.Count - 1;					

_________________
<< FaTaLGuiLLoTiNe >>
Rhinoceroses don't play games!
seppel86 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 54



BeitragVerfasst: Di 01.06.04 16:55 
Ok, danke. Mehr braucht ich auch nicht, weil ich bis zu dem Index mit ner for-Schleife zählen wollte. Habs jetzt aber mit repeat l.next until l.islast=true gemacht.

seppel