Autor Beitrag
-delphin-
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 200



BeitragVerfasst: So 18.09.05 17:59 
Wie mache ich bei einer Repeat-Until-Schleife mehrere Abbruchbedingungen?
Mit
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
  until
  begin
    StringGrid1.Cells[j,k]='Gespielt!';
    StringGrid1.Cells[k,j]='Gespielt!';
  end;


geht des nich oO


Moderiert von user profile iconGausi: Topic aus Algorithmen, Optimierung und Assembler verschoben am So 18.09.2005 um 19:02
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8553
Erhaltene Danke: 479

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 18.09.05 18:01 
ausblenden Delphi-Quelltext
1:
until (StringGrid1.Cells[j,k]='Gespielt!'AND (StringGrid1.Cells[k,j]='Gespielt!);					

_________________
We are, we were and will not be.
PLuS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 98

Win XP, Suse Linux 9.0
D5 Standard, D2005 Personal; Perl; PureBasic
BeitragVerfasst: So 18.09.05 18:03 
Wenn ich das richtig verstehe, geht dat so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
repeat
 //dein Code

until (StringGrid1.Cells[j,k]='Gespielt!'AND (StringGrid1.Cells[k,j]='Gespielt!');


MfG
PLuS
-delphin- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 200



BeitragVerfasst: So 18.09.05 18:12 
danke, das geht erstmal..
jetz will ich die cols und die rows in einem StringGrid zählen lassen, aber mit Cols.Count bzw. Rows.Count geht des nicht.
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 18.09.05 18:14 
Hallo

ausblenden Delphi-Quelltext
1:
stringgrid.colcount und stringgrid.rowcount					


das mußt du doch schon kennen, oder wie durchläufst du die einzelnen zellen des Grids?

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
-delphin- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 200



BeitragVerfasst: So 18.09.05 19:32 
mit cells..


Zuletzt bearbeitet von -delphin- am So 18.09.05 19:51, insgesamt 2-mal bearbeitet
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 18.09.05 19:39 
das ist schon klar, aber mit grid.cells[x,y] hast du x und y-werte und die durchläufst du dann doch in irgendeiner Schleifenform durchlaufen? wie sieht denn da dein restlicher code aus, wenn du colcount und rowcount nicht kennst?

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
-delphin- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 200



BeitragVerfasst: So 18.09.05 19:51 
naya ich kenn es schon, aber mich hat was verwirrt, weil des nich gefruchtet hat.. aber was anderes noch... gibt es einen befehl, der die letzte zeile in einem Memo anspricht? Ich habe nämlich zwei Variablen x und y, die den wert von 1-18 haben können (Zufall) und ich will neue Zufallszahlen, falls in der letzten Zeile des Memos eben jene Zahlen vorhanden sind
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 18.09.05 20:02 
neue frage, neuer thread
ausblenden Delphi-Quelltext
1:
s:=memo.lines[memo.lines.count-1]					

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)