how to construct a formula based on user's input?
-
Hello, how do I construct a mathematical formula based on user's TEXT input? It would be too complicated to explain what do I need to accomplish in my app, but let's just say that there's a textbox on a user form and based on what the user enters into that textbox, further calculation will be done. E.g. if user enters "a + ( b / 2 )" and "a" and "b" will be recognized/parsed as valid variables with some internal meaning, the app will do certain calculation based on this formula. It would be too cumbersome to try to catch all possible input combinations the user might possible enter. There must be some standard way on how to do this. Is there any best practice on how to do this? Thank you very much for any input, Michal Kreslik
-
Hello, how do I construct a mathematical formula based on user's TEXT input? It would be too complicated to explain what do I need to accomplish in my app, but let's just say that there's a textbox on a user form and based on what the user enters into that textbox, further calculation will be done. E.g. if user enters "a + ( b / 2 )" and "a" and "b" will be recognized/parsed as valid variables with some internal meaning, the app will do certain calculation based on this formula. It would be too cumbersome to try to catch all possible input combinations the user might possible enter. There must be some standard way on how to do this. Is there any best practice on how to do this? Thank you very much for any input, Michal Kreslik
There have been several articles on CP about this. Search keywords could be: symbolic, expression, evaluation :)
Luc Pattyn
-
There have been several articles on CP about this. Search keywords could be: symbolic, expression, evaluation :)
Luc Pattyn
Thank you very much, you helped me a lot by placing a correct name on the issue. Thanks, Michal