[An On-Line RECON Demo] [Home]
Site Map

Calculator RPN Example Calculator


The Reverse Polish Notation calculator (RPN) is made up of four files:

  1. RPNMAIN.C
  2. RPNGETOP.C
  3. RPNSTACK.C
  4. RPNGETCH.C

and can be considered to have four ``features'':

  1. addition
  2. subtraction
  3. multiplication
  4. 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.


[An On-Line RECON Demo] [Home]
Site Map