
I'd like to make a program that works on mathematical functions. I'd like to let the user define it's own functions during runtime. How can i tell my program to evaluate it?
E.g. The user wants to work on the sin(x) function. He writes the string "sin(x)" in a proper window and presses enter: BLAM! the program understands it.
Have i to program a parser? (that would be the long and tricky way)
I know that some languages have a "eval" function so that, if you give them a command like "eval(string)", where string="sin(x)", the resulting action is the evaluation of the sin of x! That would be a very efficient trick to bypass the need of a parser...
The question is a similar trick possible in ZGE?
Thanks in advance!