Forum: Object-Pascal / Delphi-Language
Delphi
by Zwixx,
10. Aug 2007
du musst die Variable schon deklarieren... sonst geht nix
Am Anfang der Prozedur
var
Anzahl : Integer;
Forum: Object-Pascal / Delphi-Language
Delphi
by Zwixx,
10. Aug 2007
Dann hast du 2 Ansatzmöglichkeiten:
1. Abfrage direkt der Labels:
Anzahl := 0;
if label1.caption = 'x' then Inc(Anzahl);
if label2.caption = 'x' then Inc(Anzahl);
if label3.caption = 'x' then Inc(Anzahl);
if label4.caption = 'x' then Inc(Anzahl);
if label5.caption = 'x' then Inc(Anzahl);