![[Home]](go_up.gif)
Site Map
RPN Example
The Reverse Polish Notation calculator (RPN) is made up of four files:
- RPNMAIN.C
- RPNGETOP.C
- RPNSTACK.C
- RPNGETCH.C
and can be considered to have four ``features'':
- addition
- subtraction
- multiplication
- division
In reverse Polish notation, each operator follows its set of operands;
an infix expression like:
(1 - 2) * (4 + 5)
is entered as
1 2 - 4 5 + * Q
Each test case is terminated by Q to end execution of the target
program. Let's say you wanted to find the unique code where the multiplication
operation is executed. You would first define a set of test cases, some
of which use the multiplication ("*") operator, some of which
do not.
![[Home]](go_up.gif)
Site Map