Einzelnen Beitrag anzeigen

axelf98

Registriert seit: 27. Aug 2003
Ort: Ennepetal
440 Beiträge
 
Delphi 2005 Personal
 
#4

Re: 2-Dimensionales Array sortieren?

  Alt 5. Sep 2003, 09:32
Danke, ich hab das Problem jetzt schon selbst gelöst:

Delphi-Quellcode:
 function Loesungssystem.sort(Eingabe : TListe; n1 : integer) : TErgebnisListe;
  VAR x,y,i : integer;
    tausch : boolean;
     e : tergebnisliste;
 Begin
 y := n1;
 tausch := true;
 While tausch do
  Begin
   tausch := false;
   For x := 0 to y -1 do
    If Eingabe[x,1] > Eingabe[x+1,1] then
     Begin
      tausch := true;
      tausche (Eingabe[x,1], Eingabe[x+1,1]);
      tausche (Eingabe[x,0], Eingabe[x+1,0]); // Mitsortierung
     End;
   y := pred(y);
  End;
 End;
  Mit Zitat antworten Zitat