That is caused by stack underflow. Add a check for it. For any operator, there must be at least two operands on the stack.
In reply to Re^7: Reverse Polish Notation Question
by Anonymous Monk
in thread RPN Question
by nat47
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |