Delphi dynamically calling different functions

Member_2_7965240
Member_2_7965240 used Ask the Experts™
on
type
  TNodeFunction = function(AInput: String): String;

implementation

function Func1(AInput: String): String;
begin
   result := AInput;
end;

Open in new window

Then I can do this:
var
  SomeFunc,: TNodeFunction;
begin
     SomeFunc = Func1;
    ....
So far it is good.

But my problem is that a certain place I need to detect in my program that I gave value to SomeFunc or not.

I tried this :
If SomeFunc<> nil Then <- but I get this error [dcc32 Error]  E2008 Incompatible types

Thank you very much for your help!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Developer
Commented:
You need to use If Assigned(SomeFunc).

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial