Calctool is a simple calculator. It contains graphical interfaces for MGR, NeWS,
SunView, X11 and XView, as well as being able to function on normal display
terminals using a termcap interface. It can receive input via the keyboard,
or the mouse where applicable. Each calculator button has two functions
associated with it.
Internal arithmetic is done with double precision floating point numbers.
Accuracy can be adjusted from zero to nine numeric places in fixed notation,
but numbers can be displayed in scientific notation as well. The calculator
reverts to scientific notation when the number is larger than the display
would allow in fixed notation. The base of operation can be changed between
binary, octal, decimal and hexidecimal. Numbers are initially displayed in
fixed notation to two numeric places, in the decimal base.
You can use the SunView / XView
Get function keys in conjunction with the numeric display to store or retrieve
characters from the text shelf. The previous digit entered can be removed
and the whole display cleared.
There are ten memory registers; numbers can be retrieved or stored in
these locations, and arithmetic can be performed upon register contents.
The display windows contains the current numerical value plus the current
base and trigonometric type. There are also indicators which show if the
hyperbolic and inverse function switches are set, and which numerical mode
is currently in operation. If an operation needing more than one numerical
input is partially complete, the operation is also displayed in this window
as a reminder.
The calculator has arithmetical, logical and trigonometrical functions.
These are grouped together and color coded on color workstations.
With the SunView and XView versions, there is support for popup menus with
the right mouse button. Only certain buttons which have multiple options
have this ability. These are the ACC, CON, EXCH, FUN, <, >, RCL and STO keys.
Online help is provided via a help button. Select this button, and then
the function you wish to be described. The calctool windows can be redrawn
by typing ^L (control-l). This is very useful with the tty version after
somebody has written system messages all over your screen.
calctool will look for a
.calctoolrc file in the users home directory. This file allows the user to define
their own constants and function definitions. It then looks for a
.calctoolrc file in the current directory. With the
.calctoolrc file, there are currently four valid record types; comments, constants,
function definitions and initial memory register values.
Lines starting with a # are treated as comments and ignored.
Lines starting with c or C in the first column are definitions for
constants. The cC is followed by a digit in the range 0-9, then a space.
This is followed by a number in fixed or scientific notation. Following
this is an optional comment, which if found, will be used in the popup
menu for the constants. If the comment is present, then there must be at
least one space between this and the preceding number.
Lines starting with f or F in the first column are definitions
for functions. The fF is followed by a digit in the range 0-9, then a
space. This is followed by a function definition. Following this is an
optional comment, which if found, will be used in the popup menu for the
functions. If the comment is present, then there must be at least one
space between this and the preceding function definition.
Lines starting with r or R in the first column are definitions
for the initial contents of the memory registers. The rR is followed
by a digit in the range 0-9, then a space. This is followed by a number
in fixed or scientific notation. The rest of the line is ignored.
All other lines are ignored. There should be no embedded spaces in the
function definitions. Whenever a backslash is found, this and the following
character signify a control character, for example \g would be ASCII 7.