in reply to Re^4: Reverse Polish Notation Question
in thread RPN Question

Because the 2 and the 4 are two separate operands.

Replies are listed 'Best First'.
Re^6: Reverse Polish Notation Question
by nat47 (Sexton) on May 02, 2015 at 02:09 UTC
    Sorry, I was looking at that because when I've been trying to process long strings I've been getting the error "Modification of non-creatable array value attempted, subscript -2", I fixed it, I needed spaces after everything

      That is caused by stack underflow. Add a check for it. For any operator, there must be at least two operands on the stack.