With negative numbers ( using a unary '-' ), such as the examples:
How is this converted to postfix? I haven't really tackled the issue too deep but it seems like it may interfere with a minus in postfix. I'd wager a guess that these would be converted as:
But in evaluating the second one, I could see myself ending up with a loose end at 7*. I hope you're following. If you know how these are handled, please tell me. Perhaps I should put parenthesis in the postfix such as:
Any suggestion or answers on how this is handled? The way my program is set up, it's currently accepting a string, converting to a postfix string and evaluated to a long. Thanks.