User-inputed code/math
BlitzMax Forums/BlitzMax Beginners Area/User-inputed code/math
| ||
Is there a way for the user to input "3*5+3.2/7" into an input or textfield and find the answer? |
| ||
Your have to parse it yourself im afraid. Either parsing/evaluating directly. or producing a parse tree, and evaluate that. EDIT: i was bored so i whipped up a simple expression evaluator as an example =) EDIT2: beefed up version of this in code archives Expression Evaluator |
| ||
. |
| ||
I added a beefed up version to the code archives for future reference. Expression Evaluator |