Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 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.013 c
3-26334
DLans
2003-05-19 04:13
2003.06.09
Организация БД на низком уровне


3-26336
Zn
2003-05-20 10:24
2003.06.09
Проблеммы с отображением поля Float из подчинён. таблицы


14-26732
asafr
2003-05-22 15:34
2003.06.09
Резюме сисадмина


1-26546
borg
2003-05-28 09:32
2003.06.09
Edit + степень


14-26654
zhenya
2003-05-23 21:37
2003.06.09
InetDetect????