So direkt geht das nicht. Du könntest aber eine Compare-Funktion schreiben, die nicht nur a und b als Parameter hat, sondern auch den Vergleichsoperator. Letzteren dargestellt als Char, Integer oder (vermutlich am sinnvollsten) Aufzählungstyp.
Delphi-Quellcode:
function MyCompare(a,b: Integer; operator: TMyOperatorEnum): boolean;
begin
case operator of
op_lesser: result := a < b;
op_bigger: result := a > b;
op_lesser_eq: result := a <= b;
// ...
end;
end;
Being smart will count for nothing if you don't make the world better. You have to use your smarts to count for something, to serve life, not death.