|
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;
**************************** But how to put the data back to 0? |
|