procedure sortowanieszybkie; {1}
procedure sortuj(l,p:indeks); {2}
var i,j:indeks; x,w:obiekt; {3}
begin i:=l; j:=p; {4}
x:=a[(l+p)div 2].klucz; {5}
repeat {6}
while a[i].klucz < x do {7}
i:=i+1; {8}
while x < a[j].klucz do {9}
j:=j-1; {10}
if i<=j then {11}
begin w:=a[i]; {12}
a[i]:=a[j]; {13}
a[j]:=w; {14}
i:=i+1; {15}
j:=j-1 {16}
end {17}
until i>j; {18}
if l<j then sortuj(l,j); {19}
if i<p then sortuj(i,p); {20}
end; {21}
begin sortuj(1,10); {22}
end;{sortowanieszybkie} {23}