On 1/10/2012 05:39, Sven Barth wrote:
// -1 if aLeft < aRight
// 0 if aLeft = aRight
// 1 if aLeft > aRight
begin
// compare the two items and return the correct value
end;

// somewhere else:
aList.Sort(@SatDataCompare);

What I wrote here might not be perfect, but it should give you a start.

i've been working with what you sent and have run into a problem i don't understand or how to find and fix...

Error: Operator is not overloaded
You’re trying to use an overloaded operator when it is not overloaded for this type.


i don't know what this is pointing to because it is evidently not in my sources but in a unit i'm loading... the actual compiler message is

(750,50) Error: Operator is not overloaded
satsort.pas(434) Fatal: There were 1 errors compiling module, stopping
satsort.pas(0) Fatal: Compilation aborted

i don't know if this is because i wrote an IsSameStr function because i could not find an IsSame one... i actually have two... one checks if two string vars have the same string and the other checks if two double vars have the same double... IsSameStr is boolean for true or false but IsSameReal returns an integer of -1 (var1 < var2), 0 (var1 = var2) or 1 (var1 > var2)...

am i in the right target area?

i should mention my fpc version is

╔═[■]════════════════════  About  ═════════════════════════╗
║                                                                    ║
║           FreePascal IDE for Win32 for i386                        ║
║                    Target CPU: i386                                ║
║               Version 1.0.12 2011/06/01                            ║
║                (Compiler Version 2.4.5)                            ║
║                                                                    ║
║               Copyright (C) 1998-2009 by                           ║
║                                                                    ║
║                      Bérczi Gábor                                  ║
║                     Pierre Muller                                  ║
║                          and                                       ║
║                      Peter Vreman                                  ║
║                           OK   ▄                                   ║
║                        ▀▀▀▀▀▀▀▀▀                                 ║
╚════════════════════════════════════════════════════════╝
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to