Текущий архив: 2003.06.09;
Скачать: CL | DM;
Вниз
Сортитровка в TList Найти похожие ветки
← →
zeppelin © (2003-05-29 15:27) [0]Добрый день.
Подскажите пожайлуста, как работать с Sort в TList.
Спасибо.
← →
reonid © (2003-05-29 15:37) [1]function SomethingCompare(Item1, Item2: Pointer): Integer;
begin
if TSomething(Item1).Value = TSomething(Item2).Value then Result := 0
else if TSomething(Item1).Value > TSomething(Item2).Value then Result := 1
else if TSomething(Item1).Value < TSomething(Item2).Value then Result := -1;
end;
ListOfSomething.Sort(SomethingCompare);
← →
Palladin © (2003-05-29 15:44) [2]в справке пример есть!
Страницы: 1 вся ветка
Текущий архив: 2003.06.09;
Скачать: CL | DM;
Память: 0.46 MB
Время: 0.028 c