I'm tearing my hair out trying to get passing a function as parameter to work. I try to find the cause of the failure, I've put a skeleton together with just the relevant items in it.
Here's a (very) simple bit of code which when presented to the compiler complains "Wrong number of parameters". This facility must work, so I assume I'm missing something fairly simple. Can anyone point it out?
program Project1;
type Tmyfunc = function(s:string):boolean;
TMyproc = procedure(w:word);
function TestF(s:string):boolean;
begin
end;
procedure NominateF(F:TMyfunc);
begin
end;
procedure NominateP(P:TMyProc);
begin
end;
begin
NominateF(TestF);
end.
Thanks.