User-inputed code/math

BlitzMax Forums/BlitzMax Beginners Area/User-inputed code/math

CASO(Posted 2007) [#1]
Is there a way for the user to input "3*5+3.2/7" into an input or textfield and find the answer?


grable(Posted 2007) [#2]
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




xMicky(Posted 2007) [#3]
.


grable(Posted 2007) [#4]
I added a beefed up version to the code archives for future reference.
Expression Evaluator