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 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
why is RPN always reversed (not PN) - StephenG1CMZ - 05-25-2015, 06:14 AM
RE: why is RPN always reversed (not PN) - Thomas Radtke - 05-25-2015, 06:42 AM
RE: why is RPN always reversed (not PN) - StephenG1CMZ - 05-25-2015, 07:19 AM
RE: why is RPN always reversed (not PN) - Les Bell - 05-25-2015, 07:44 AM
RE: why is RPN always reversed (not PN) - StephenG1CMZ - 05-25-2015 12:23 PM
RE: why is RPN always reversed (not PN) - Gerald H - 05-25-2015, 07:11 AM
RE: why is RPN always reversed (not PN) - StephenG1CMZ - 05-25-2015, 12:04 PM
RE: why is RPN always reversed (not PN) - Didier Lachieze - 05-25-2015, 09:01 AM
RE: why is RPN always reversed (not PN) - Gerald H - 05-25-2015, 09:54 AM
RE: why is RPN always reversed (not PN) - ndzied1 - 05-25-2015, 10:59 AM
RE: why is RPN always reversed (not PN) - nlj - 05-25-2015, 11:44 AM
|
User(s) browsing this thread: 8 Guest(s)