After examining the SDK header and demo, I've got some questions and comments...
First, to avoid confusion - I would add something to the demo:
Also, it looks like the Eval() will take some PPL code and compile/run it. It also appears to make separate spaces for variables, etc... so, that's good (i.e. I could use the same code running multiple times independant from each other). But I don't see a way to make a function in PPL and call it repeatedly.
Here's an example - the user specifies a calculation to be made 'x+y'. So I would want to do something like this:
Does that make sense? Basically, go ahead and compile it for speed's sake and then call it multiple times.
Thanks.
edit: could you also explain the need for all the variables passed to GetVariable? I would have expected to see something along the lines of GetVariable(app, void *, var_type).
First, to avoid confusion - I would add something to the demo:
- Code:
if (InitializePPL())
...
else
printf("InitializePPL failed!\n");
Also, it looks like the Eval() will take some PPL code and compile/run it. It also appears to make separate spaces for variables, etc... so, that's good (i.e. I could use the same code running multiple times independant from each other). But I don't see a way to make a function in PPL and call it repeatedly.
Here's an example - the user specifies a calculation to be made 'x+y'. So I would want to do something like this:
- Code:
app *pplapp = Eval("global(x$,y$,r$); proc calc r=x+y; end");
while(loop)
{
SetVariable(a, "x$", x);
SetVariable(a, "y$", y);
CallProc(a, "calc");
GetVariable(a, "r$", &r);
...
}
FreeApp(a);
Does that make sense? Basically, go ahead and compile it for speed's sake and then call it multiple times.
Thanks.
edit: could you also explain the need for all the variables passed to GetVariable? I would have expected to see something along the lines of GetVariable(app, void *, var_type).