An Extended Multi-Function Desktop Calculator
by Mike Ironmonger

This Desktop calculator is a much enhanced version of the Calculator application from RISC User Volume 3 Issue 2. It works by using Basic's EVAL function, and thus will evaluate any legal Basic expression.

To perform a calculation, set the caret (the red vertical bar) to the appropriate window using the pointer or the Up & Down cursor keys. Type in the expression, either from the keyboard or by clicking on the buttons in the calculator window, then click on one of the Binary, Hex or Decimal buttons to display the result in that base, or press Return to display the result in the most recently selected base. The current base is indicated by a green dot on one of the base buttons. Note that hexadecimal and binary numbers are converted to integers by rounding towards zero.

Pressing F1-F3 or clicking on the corresponding button will result in that display's contents being copied to the caret position. Finally the three C buttons on the right clear the displays.
 
The display has been much improved, and the displays are wider than before to accomodate longer expressions, and the full range of hexadecimal buttons has been added.

There are two extra buttons, Undo [<<] and Redo [>>]. These will only operate when the caret is in one of the three displays, and their keyboard equivalents are F8 and F9 (the same as Edit).

Displays can be saved and loaded. There are two ways to save a display. The first (and easiest) is simply to drag the display to a directory viewer, where it will be saved as a text file with the name "Display1", "Display2" or "Display3". The second method is to save it via the calculator's menu (obtained by clicking Menu over the calculator window) by choosing the "Save" submenu and then one of the display submenus. To load a display (or any other text file) simply drag the file from a directory viewer into one of the three displays.

Displays can also be dragged directly to and from other applications, using the same save methods described above.

Nine scientific constants are available, just by using their letters in the expressions (e.g. the speed of light squared can be entered by "c^2" rather then the more cumbersome "299792458^2".

c = 299792458     ms-1      Speed of light in a vacuum
h = 6.26176E-34   Js        Planck's Constant
G = 6.672E-11     Nm2kg-2   Universal Gravitational Constant
e = 1.6021892E-19 Coulombs  Electronic charge
m = 9.109534E-31  kg        Electronic mass
U = 1.6605655E-27 kg        Atomic mass unit
A = 6.022045E23   per mole  Avagadro's Number
k = 1.380662E-23  JK-1      Boltzmann's constant
V = 0.02241383    m3mol-1   Molar volume of ideal gas at stp

The way decimal results are displayed can now be controlled via the calculator's menu. The "Format" submenu allows you to choose between general, exponent or fixed format, and the "Digits" submenu determines the number of digits displayed.
