Post Reply 
why is RPN always reversed (not PN)
05-25-2015, 12:23 PM
Post: #11
RE: why is RPN always reversed (not PN)
[quote='Les Bell' pid='36058' dateline='1432539866
What you are really getting at is the notion of type safety and type promotion. In your example, you use the ADD or + operator, which might cause a syntax error when applied to strings. However, it might not if it really represents string concatenation and it can promote, say, a number higher on the stack to a string to allow that.
l
[/quote]

Concatenation was actually the first example I thought of - because some languages allow + but others expect & or Concat or Str(num), so as I use a variety show of languages I would often be likely to do a lot of typing in then hit + in the wrong language.

But now I see why RPN is easier. Thanks.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: why is RPN always reversed (not PN) - StephenG1CMZ - 05-25-2015 12:23 PM



User(s) browsing this thread: 1 Guest(s)