Contents
Page-10
Prev
Next
Page+10
Index
Executing Reverse Polish
RPN is easily executed by a stack machine:
- Operands are pushed onto the stack.
- When an operator is encountered, the appropriate number of operands
is popped from the stack and the operator is applied to them. The result
is pushed onto the stack.
- When the end of the input expression is reached, the result is the
top of the stack.
HP makes a line of pocket calculators that use RPN.