Forum: Sonstige Fragen zu Delphi
Delphi
by Hansa,
15. Mär 2008
Es sind fast 400.000 Zeilen. Add hat gegenüber exchange einen geringen Vorteil von 0,7 % = 3 Sek.
Forum: Sonstige Fragen zu Delphi
Delphi
by Hansa,
15. Mär 2008
Es geht nur um die Zeit ?
// braucht 6 Min. 44 Sek.
sl2 := TStringlist.Create;
for i := sl1.count - 1 downto (sl1.count - 1) div 2 do begin
sl1.exchange(i,j);
j := j + 1;
end;
memo2.Lines := sl1;
Forum: Sonstige Fragen zu Delphi
Delphi
by Hansa,
14. Mär 2008
Jo. :mrgreen: Siehe hier :
procedure TStringList.Exchange(Index1, Index2: Integer);
begin
if (Index1 < 0) or (Index1 >= FCount) then Error(@SListIndexError, Index1);
if (Index2 < 0) or (Index2 >= FCount) then Error(@SListIndexError, Index2);
Changing;
ExchangeItems(Index1, Index2);
Changed;
end;
Forum: Sonstige Fragen zu Delphi
Delphi
by Hansa,
14. Mär 2008
Wohl noch nie was von DOWNTO gehört ?