Thanks and sorry for this stupid mistake.
Il 08/ott/2015 16:47, "Michael Van Canneyt" <mich...@freepascal.org> ha
scritto:

>
>
> On Thu, 8 Oct 2015, Andrea Mauri wrote:
>
> Dear all,
>>
>> I am trying to sort a simple TIntegerList defined as:
>>
>> TIntegerList = specialize TFPGList<Integer>;
>>
>> In order to sort I introduced a compare function as:
>>
>> function CompareInt(const Item1,
>>  Item2: Integer): Integer;
>> begin
>>  if Item1 < Item2 then
>>    Result:= -1
>>  else if Item2 > Item1 then
>>
>
> This is wrong. It is in fact the same condition as your first if.
> it should be
>   if Item1>Item2 then
>
> Michael.
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to