Avatar of Member_2_7965240
Member_2_7965240
 asked on

Delphi dynamically calling different functions

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!
Delphi

Avatar of undefined
Last Comment
ste5an

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
ste5an

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61