Post Reply 
why is RPN always reversed (not PN)
05-25-2015, 06:14 AM
Post: #1
why is RPN always reversed (not PN)
Can anyone explain why RPN is always reversed.
I have always thought Polish notation better - and not because of my surname.

in RPN, operands are written before operators.
Which means
"a long text with pages of legal small print" PRINT is OK
But
"A long text " ADD
Fails with a syntax error after a couple of hours of typing and translating.

(Mathematicians may use an example involving the digits of pi and a function expecting an integer instead)

Whereas in Polish notation of course the operands follow the operator (the sequence is reversed from that of RPN, or simply unreversed).

ADD "a very short text
Fails with a syntax error as soon as you hit the "

To me, that ability to detect an error before typing in a complex operand seems a clear winner.

Yet PN never seems to be used, only RPN.

What are the advantages of reversing the sequence?

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
why is RPN always reversed (not PN) - StephenG1CMZ - 05-25-2015 06:14 AM



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