Einzelnen Beitrag anzeigen

NormanNG

Registriert seit: 1. Feb 2006
294 Beiträge
 
Delphi 2007 Professional
 
#8

Re: endlosschleifenfehler mit while

  Alt 2. Apr 2008, 09:49
Hi,

du muss die innere Zählvariable zurücksetzen:
Delphi-Quellcode:
while (gespeichert = true) or (i <= form1.StringGrid1.rowcount) do
    begin
      while (gespeichert = true) or (x <= form1.stringgrid1.ColCount) do
        begin
          if form1.stringgrid1.cells[i,x] <> form1.stringgrid2.cells[i,x] then
             begin
               gespeichert := false;
             end;
          x := x + 1;
        end;
     i := i + 1;
     x := 1; <--------------- hier
    end;
Gruß
Norman
  Mit Zitat antworten Zitat