I need to pass function as a parameter like this:
procedure SomeProc(AParameter: TFunc<Integer, Integer>);
When I have this function...
function DoSomething(AInput: Integer): Integer;
...
SomeProc(DoSomething);
...
...the code works. But with parameter modificators like const, var, or default values like...
function DoSomething(const AInput: Integer = 0): Integer;
...compiler returns error of mismatch parameter list.
Is there any way to pass parameter modificators, or avoid this error?
Many thanks for your suggestions.