**Reverse Polish Notation Calculator**has received a new update. Marvel at the new colour scheme and amazing features!

Find the downloads page here - follow this link.

RPN Calculator has been expanded to include loads of new features (see below).

Here is a quick summary:

* Enter Reverse Polish Calculations in a single line.

* Denary, Binary, Octal and Hex modes.

* Open Windows dialogue boxes.

* Search Google or Bing from the calculator.

* Full BB4W source code provided for the curious student.

For more on Reverse Polish Notation - follow this link.

# RPN Calculator Help version 0.0.1.7

Reverse Polish Notation is a method for expressing algebra in which the operators are placed to the right of their operands. For example, the algebraic expression**(4+5)*3**becomes

`4 5 + 3 *`

.Functions are placed to the right of their argument, and return a single value. For example,

**sin(x+y)**becomes

`x y + sin`

Visit the RPN homepage.

## Syntax

### Operators

`+`

Addition.`-`

Subtraction.`*`

Multiplication.`/`

Division.`^`

Raise to power.`div`

Integer division.`mod`

Remainder of division.`and`

Bitwise logical AND operation.`or`

Bitwise logical OR operation.`eor`

Bitwise logical EXCLUSIVE OR operation.`==`

Checks for equality between the operands. Returns -1 (true) if the two operands are equal, otherwise returns 0 (false)

### Functions

`abs`

A function which returns the absolute value of its numeric argument.`acs`

A function which returns, in radians, the arc-cosine of its numeric argument. The permitted range of the argument is –1 to +1.`asn`

A function which returns, in radians, the arc sine of its numeric argument. The permitted range of the argument is –1 to +1.`atn`

A function which returns, in radians, the arc tangent of its numeric argument. The permitted range of the argument is from minus infinity to plus infinity.`cos`

A function giving the cosine of its radian argument.`deg`

A function which converts radians to degrees.`exp`

A function returning 'e' to the power of the argument.`int`

A function truncating a real number to the lower integer.`inv`

A function which returns the inverse 1/x of the argument.`ln`

This function gives the logarithm to the base 'e' of its argument. The 'natural' number, 'e', is approximately 2.71828183.`log`

A function giving the base-10 logarithm of its argument.`not`

A function return the opposite boolean value to its argument. All +ve/-ve numbers evaluate as -1 (true). Zero evaluates as 0 (false)`rad`

A function which converts degrees to radians.`rnd`

A function which returns a random number. The type and range of the number returned depends upon the optional parameter.`sgn`

A function returning –1 for negative argument, 0 for zero argument and +1 for positive argument.`sin`

This function returns the sine of an angle. The angle must be expressed in radians, not degrees.`sqr`

A function returning the square root of its argument.`tan`

This function returns the tangent of an angle. The angle must be expressed in radians, not degrees.`round`

This function returns a real number rounded to the nearest integer.

### Commands

`copy`

Copies the accumulator to the Windows Clipboard. NB CTRL+C copies the current input line to the clipboard instead.`help`

Loads this help file.`clear`

Sets the accumulator, all user-defined variables and the system clock to zero.`quit`

Closes the RPN calculator without further warning.`den`

Enters DENARY mode (base 10).`hex`

Enters HEXADECIMAL mode (base 16).`oct`

Enters OCTAL mode (base 8).`bin`

Enters BINARY mode (base 2).`acc on`

Prevents the accumulator from clearing between calculations. The value of each calculation is added to the previous value of the accumulator.`acc off`

Returns the accumulator to its usual behaviour.`set time`

Opens the Windows 'set time' dialogue.`set date`

Opens the Windows 'set date' dialogue.`programs`

Opens the Windows 'programs' dialogue.`admin`

Opens Windows admin tools.`sound`

Opens Windows sound controls.`version`

Shows current version of RPN calc and OS.`files`

Opens windows explorer.`power`

Shows current power status.`cp`

Opens Windows 'control panel' dialogue.`google`

Sends search query to Google, eg`google this thing`

.`bing`

Sends search query to Bing, eg`bing this thing`

.`define word`

Defines the search term using Google.`free space`

Shows free space on drive letter, eg`free space c`

.`magnifier`

Opens Windows magnifier tool.`notepad`

Opens Windows Wordpad.`ping`

Sends a ping to ip eg`ping 8.8.8.8`

.`tasks`

Opens Windows task scheduler.`cmd`

Windows command line.

### Special variables and constants

`pi`

This variable has a constant value of 3.14159265`time`

This special variable holds the value of the current internal system clock in centi-seconds (one-hundreths of a second).`last`

This special variable holds the current value of the accumulator. Thus a calculation can make use of the previous result.

### Making an assignment to a variable

The RPN calculator has 26 variables with the identifiers 'a', 'b', 'c' ... 'z'. Assignment to a variable is made as follows:`5 5 + = x`

Here, the value '10' is assigned to the varible 'x'. This variable can now be used in further expressions.

All variables are initialised to zero upon the program starting, and can be cleared with the

`clear`

command.## User Interace

### Miscellaneous:

- Insert - Toggle Insert/Overwrite mode
- Enter - End input
- Esc - Terminate input, returns NUL string
- Ctrl+J - As Enter but does not store in line history
- Ctrl+S - Toggle case of current character
- Ctrl+T - Transpose adjacent characters
- Ctrl+G - Sound system bell

### Movement:

- Left - Move left one character
- Right - Move right one character
- Ctrl+Left - Move left one word
- Ctrl+Right - Move right one word
- Home - Move to start
- End - Move to end

### Clipboard:

- Ctrl+C - Copy line to clipboard
- Ctrl+X - Cut line to clipboard
- Ctrl+V - Paste text from clipboard

### Deletion:

- BkSp - Delete left one character
- Del - Delete right one character
- Ctrl+U - Clear input buffer
- Ctrl+Home - Delete to start
- Ctrl+End - Delete to end

### History:

- Up - Previous input
- Down - Next input
- Ctrl+Up - Select first input in buffer
- Ctrl+Down - Select last input
- Shift+Up - Skip back 16 inputs
- Shift+Down - Skip forward 16 inputs

## Error messages

###
`Stack is empty`

This error is generated when the calculator cannot find an argument to a function, or the operands to an operation. This error is generated by the following example: `4 +`

.###
`Insufficient operators`

This error is generated when the calculator cannot find the right amount of operators for the expression to make sense. The following example will generate this message: `4 4`