Basically you parse the expression, adding values to a stack when you encounter them. When you get to an operator you pop the appropriate number of values off the stack, do the operation, then push the result back onto the stack. It's pretty simple really.
Toot, did what I said before help? I'm not actually sure I understood the question. I'm pretty sure the easiest way of doing this is recursive functions.




Reply With Quote