Post Reply 
question : a trick to call function from a variable
10-09-2016, 11:14 AM
Post: #3
RE: question : a trick to call function from a variable
Hi StephenG1CMZ,
Thank you very much, it's OK.

By the way, a note for thoses who may want to use such callback trick : if you want to use string as function parameters, you have to protect them with backslashs (\").

For example par2 accept string abcd

Code:
EXPORT myfct(par1, par2)
BEGIN
  PRINT(par1+" and "+par2);
END;

EXPORT test(fct)
BEGIN
  local call:=fct+"(123,\"abcd\")";
  EVAL(call);
END;

primer
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: question : a trick to call function from a variable - primer - 10-09-2016 11:14 AM



User(s) browsing this thread: 1 Guest(s)