Say it generates @expr = "((2 + 4 * 6 / 3) <= 20)"; or @expr = "((10 * 3)+(2 / 5) == 1)"; The whole expr will be stored in d form of a string. I need to evaluate this expression and validate it. N i want the "compiler" to solve it and return me d answer. Can this be possible? Plz help me as this is very imp.. Thanks In Advance !sub genRandomExpr { pickOperator(); pickRandomOperands(); formExpression(); return expr; } sub formExpression { createSubExprs(); merge(); return this; }
In reply to Solving an expression by zeni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |