Min / Max function with comiler magic? |
|
I wrote some integer / float helper methods for global functions in Math.pas
e.g.
SameValue()
TIntegerHelper = record helper for Integer
public
function IsSame(AOther: Integer): Boolean;
end;
In order to cleanup my application, I remove all references to "Math" unit from all files. The only
functions that remain as global functions are Min / Max since I didn't find a reasonable name to
bind them in a record helper.
So I copied this code from Math.pas to my library unit.
Unfortunately I get a compiler error now (Ambiguous overloaded call to 'Min' on the following line:
Min(n + 64, Count);
n and Count are both of type Integer.
Can somebody explain me, what's the difference and if I can solve this problem?
cu Christian
|