Purely as an exercise at home aimed at better understanding some of the language basics, I tried to redefine the Ord function, but I ran into a problem.
In fact, the existing Ord function can take arguments of various types ( AnsiChar , Char , WideChar , Enumeration , Integer , Int64 ) and can return Integer or Int64.
I cannot figure out how to declare multiple versions of the same function.
How to code this in Delphi?
source share