//过滤完的排在前面,后面全是 MaxInt 。
procedure dely_Sort(var a:array of integer;y:integer);
var
i,j:Integer;
begin
for i := Low(a) to High(a)do
begin
if a<y then
begin
for j:=i to High(a)-1do
begin
a[j]:= a[j+1];
end;
a[j]:=MaxInt;
end
else
begin
end;
end;
end;
//过滤完的排在前面,后面全是 MaxInt,但顺序被打乱 ,速度比上面的快。
procedure dely_NotSort(var a:array of integer;y:integer);
var
i,j:Integer;
begin
j:=High(a);
for i := Low(a) to High(a)do
begin
if a<y then
begin
while a[j]<ydo
begin
a[j]:=MaxInt;
dec(j);
end;
if i<j then
begin
a:=a[j];
a[j]:=MaxInt;
end
else
begin
a:=MaxInt;
break;
end;
end
else
begin
end;
end;
end;