B
Bernhard
Hello,
I would like to build a small interpreter (in an c-program), which calls
functions with user-defined arguments.
To do this, I have a list of functions names (in an array), with the
pointers to the function (in an external library). The user-supplied
arguments I got as Strings, which i have to transform to the right type
(adresses, char, int, long, float, double etc). For each function I
have a list of the supplied argumentstype (which of course could be
different for each function).
The problem I've got is, how can I call the function with different
argumentlist?
A function-pointer is declared with a clear argument list. Also I have
to "add" the argumentlist in the source-code. But I would like to add
the argumentlist at runtime. Is there any solution for this problem?
best regards
Bernhard
I would like to build a small interpreter (in an c-program), which calls
functions with user-defined arguments.
To do this, I have a list of functions names (in an array), with the
pointers to the function (in an external library). The user-supplied
arguments I got as Strings, which i have to transform to the right type
(adresses, char, int, long, float, double etc). For each function I
have a list of the supplied argumentstype (which of course could be
different for each function).
The problem I've got is, how can I call the function with different
argumentlist?
A function-pointer is declared with a clear argument list. Also I have
to "add" the argumentlist in the source-code. But I would like to add
the argumentlist at runtime. Is there any solution for this problem?
best regards
Bernhard