RPN : Java Glossary

RPN
RPN (Reverse Polish Notation) is a simplified way of writing arithmetic expressions used in FORTH, Abundance and some Hewlett Packard calculators. In is named in honor of the Polish mathematician Jan Łukasiewicz There are no parentheses and there is no operator precedence. Evaluation is strictly left to right, all operands treated the same way. The operators follow the operands.

So
30 40 + 2 * 5 6 + /
means
( 30 + 40 ) * 2 / ( 5 + 6 )

The operands are pushed to stack and operations typically operate on the top two elements, replacing them with the result. Compilers have to convert conventional infix notation to RPN or something similar get clear on the order of execution. Internally the JVM (Java Virtual Machine) works with an RPN-like stack model and RPN-like stack operators.


CMP homejump to top

available on the web at:

http://mindprod.com/jgloss/rpn.html
  

optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\rpn.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, especially when sending an ad-hominem attack, a rant composed mainly of obscenities or a death threat, please quote the offending passage and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. I can’t very well fix erroneous or ambiguous text if I can’t find it.
Blog
IP:[65.110.21.43]
Your face IP:[107.20.129.212]
You are visitor number 11.