Главная страница
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.034 c
9-26319
MadMarine
2002-07-20 01:59
2003.06.09
Как заставить похать X под 6


14-26738
Darthman
2003-05-21 12:06
2003.06.09
Rusty Lines


1-26601
$Hic0
2003-05-27 11:48
2003.06.09
Работа компилятора


14-26776
y-soft
2003-05-21 19:18
2003.06.09
Delphi 7 и Windows CE.NET


1-26485
sam-Lite
2003-05-29 09:04
2003.06.09
Как добраться до адреса с переменными какой-то пргоги.