Autor Beitrag
Flow_K
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21

Windows XP

BeitragVerfasst: So 23.04.06 19:34 
Hallo Leute,

ich würde gerne in meinem Programm während einer Repeat-Schleife, einige Zeilen in meinem Code überspringen lassen,allerdings nur wenn eine Bedingung(also If) erfüllt wird. Also eigentlich nur einmal und nicht die ganze Repeat Schleife lang.

Wenn jemand die Antwort zu dieser Frage hat, dann wär ich ihm/ihr super dankbar, wenn ich sie geflüstert kriegen würde.

Gruß Flo
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: So 23.04.06 19:39 
ja mit einer weiteren boolean variable einfach?

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
DelphiAnfänger
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 112

Win XP, Firefox 2.0, IE6
Delphi 5 Prof., Delphi 2005 PE
BeitragVerfasst: So 23.04.06 19:39 
wo ist das problem mach doch einfach in die repeat schleife ne if abfrage
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: So 23.04.06 19:42 
So in der Richtung?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
var SchonGetan : boolean;

begin

 SchonGetan := false;

 repeat

  if (Bedingung) and (not SchonGetan) then
  begin
   //blubb
   SchonGetan := true;
  end;

  //blupp
 

 until (Abbruchkriterium);

end.
Flow_K Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21

Windows XP

BeitragVerfasst: So 23.04.06 20:27 
ja, so in der richtung, ich probier es mal aus... danke!