program zad5c;
uses crt;
var
pl:text;
tab:array [1..999999] of integer;
taba:array [1..999999] of integer;
a,i,j,suma,sum,c,d,f,g,z:integer;
procedure sort( var taba:array [1..999999] of integer; c,d:integer);
begin
if c<d then
f:=tab[a]+1;
g:=tab[a]-1;
repeat
repeat
f:=f+1 until tab[a] <= taba[f];
repeat
f:=f-1 until tab[a] <= taba[g];
until g>=j;
taba[g]:=taba[a];
taba[g]:=z;
end;
begin
clrscr;
assign(pl,'C:\Documents and Settings\ja\Desktop\pascal\dane5-3.txt');
reset(pl);
i:=0;
repeat
inc(i);
readln(pl,tab[i]);
until eof(pl);
close(pl);
for a:=1 to i do
sort(taba,c,f-1);
sort(taba,f,d);
readkey;
end.
Z tego miało wyjść szybkie sortowanie pliku . Program ma bledy, nie wiem jak im zaradzic. Prosze o wskazówki :)