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

Why is the extra space needed after the first number in the RPN?

Replies are listed 'Best First'.
Re^5: Reverse Polish Notation Question
by Anonymous Monk on May 02, 2015 at 02:05 UTC

    Because the 2 and the 4 are two separate operands.

      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.