Faleg [ Chor��y ]
Jak zrobic sortowanie w pascalu??
zrobilem program i nie wiem jak zrobic cortowanie do niego :/ nie mam zielonego pojecia prosze niech ktos sie zlituje i napisze sortowanie wedlug imienia
sortuje liste
procedure SortujListe(X : ElementListy);
var temp : Integer;
begin
WYPISZLISTE(root1);
if (X<>NIL) then
if (X<>root1^.Prev) then
if (X^.Next^.Dana >= X^.Dana) then
begin
X := X^.Next;
SortujListe(X)
end
else
begin
temp := X^.Dana;
X^.Dana := X^.Next^.Dana;
X^.Next^.Dana := temp;
SortujListe(root1)
end
end;