|
楼主 |
发表于 2020-4-10 07:45:01
|
显示全部楼层
var
i, Position, n: integer;
Value: TStrings;
Done : boolean;
begin
n := High(Items);
for i := 0 to n do
begin
Value := Items[i];
Position := i;
Done := false;
while not done do
begin
if Position <= 0 then
Done := true
else
if StrToInt(Value.Strings[13]) >= StrToInt(Items[Position - 1].Strings[13]) then
Done := true
else
begin
Items[Position] := Items[Position - 1];
Position := Position - 1;
end;
end;
Items[Position] := Value;
end;
//DownZero(Items);
end;
****************************但是数据为0的怎么往后放置呢
|
|