RPN reverses the order of operator and operand, it doesn't reverse the whole string. So in Polish Notation 2 + 3 is +23 and (2 + 3) - 1 is -+231; in RPN they become 23+ and 23+1-

Kent

Brian van den Broek wrote:
By analogy, I had always assumed that Polish Arithmetic would read

(2 + 3) - 1 and
2 + (3 - 1)

as:

-+231 and
+2-31

I further assumed that RPN would simply reverse this. If that isn't true, I think I need to go investigate the origins of the name.

Best to all,

Brian vdB

_______________________________________________
Tutor maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to