Sinclair
ZX Spectrum with 16K or
48K RAM
VU-CALC
from PSION
Load and Run by typing LOAD "VU-CALC"
Pocket calculators have become a powerful and
indispensable tool to many, though they only work out
and display one number at a time. They are useful
because there are many things in life that are well
described by a single number. There are many more
things, however, which can be described more fully and
completely with a table or an array of numbers
organised in an ordered way. VU-CALC is a program for
calculating and displaying tables of numbers and
names. You start with an empty table or grid composed
of boxes and arranged in rows and columns. With a
simple set of commands you can invoke calculator-like
formulae which link one box to another or one row to
another or one column to another so that the computer
can calculate a whole table in a few seconds. You can
also enter data or names into particular boxes and by
simply changing one or more parameters, tables for
different situations can be re-evaluated and displayed
almost immediately.
This provides an immensely powerful tool for financial
analysis, budgets, the calculation of engineering or
scientific tables, statistical analysis etc.
LAYOUT Table, Cursor and Window
On entering VU-CALC, a two-line command panel can
be seen at the top of the screen, a blank labelled area is
in the middle of the screen and an input line can be seen
at the bottom of the screen. The blank area in the
middle of the screen is a window onto the table.
The table can be thought of as a large number of boxes
ordered into rows or columns. The rows are labelled
alphabetically and the current rows shown in the
window can be seen down the left-hand margin.
The columns are labelled numerically from 01 upwards
and the current columns shown in the window are
numbered along the line immediately above the
window. Each box or rectangle is uniquely identified by
the row letter followed by the column number.
Thus, A01 or A1 refers to the box lying in the top
left-hand corner of the table.
At any stage during the use of VU-CALC, the user's
attention relates to a particular box which is illustrated
as a large red rectangle on the table. This is the cursor.
The cursor can be moved freely and rapidly to read or
enter data, text or formulae. The cursor is moved on the
table by pressing the four arrow cursor keys on the
keyboard, (caps shift held down while keys 5, 6, 7 or 8
are pressed). The cursor may be moved rapidly by
holding down one of the arrow keys firmly.
When the cursor reaches a box at the edge of the
window and the cursor keys are pressed further the
window will automatically move over the table. This can
be observed by noticing the column numbers or row
numbers along the sides of the window changing.
By this means, the user can move rapidly round a very
large table (in the case of the 48K Spectrum).
Entering Data and Text
The user may think of VU-CALC as a thinking spread-
sheet in which he may layout at will text and numerical
data. At the main command point of VU-CALC, 4 types
of entries may be made: text, data, formulae or a
command.
To enter text, position the cursor at the box where you
wish to start the text. Press " and now simply type in
the text which you wish to enter at that position. As you
type you will see the text being written on the input line
at the bottom of the screen with the small red cursor on
that line moving along. You may fill the whole line and
use the delete key to make alterations. When complete,
press "ENTER" to insert the text onto the spread-sheet.
To enter a number in any box, simply position the cursor
where you wish to enter the number and type in the
number followed by the "ENTER" key. The number will
immediately be shown in the current box.
To calculate a number at a particular box using a
formula, position the cursor at the appropriate box and
simply type in the formula. When the formula as shown
on the bottom input line is correct press "ENTER"
which will apply the formula to the current box and
which will calculate the data immediately at the
appropriate boxes. A formula may be applied to many
boxes with the # Repeat command; VU-CALC will
automatically distinguish between text, data and
formulae.
When the bottom input line is empty, typing a "#" will
set VU-CALC into the command mode and a list of
commands will appear on the top two lines. By pressing
the first character of the required command, the
command will be executed subject to its appropriate
parameters.
Formulae
The real power of VU-CALC comes from the use of
formulae for boxes, rows or columns which can
generate the data you require for your tables. The syntax
of a formula includes the use of constants (numbers),
references to the numbers in other boxes and the simple
arithmetical operators: +, -, /, *. The numbers in
another box are always referred to by the box reference
of row letter followed by column number.
In constructing formulae you may think of the box
references as variables and the formulae as simple
algebraic expressions using these variables, constants
and the arithmetical operators. Some examples of such
formulae are: -
B1*1.03
D12*(B2+1.5)/C1
D7-C7
A formula can refer to one particular box or it may be
repeated along a row, down a column, or across a
block. To achieve this, the # Repeat command is used
(see below under commands).
Formulae are always applied relatively. For example, in
the Repeat command, if the current formula is being
applied to a sequence of boxes along a row then the
column references in the formula are always
incremented as the formula is applied sequentially along
the row. For example, if the formula "1.03*A1" in the
box A2 was repeated along the row A then the formula
in box A3 would be "1.03*A2" and the formula in box
A4 would be "1.03*A3'; etc. The same relative
concept is applied down a column or over a block where
the row letters in the formula are incremented
sequentially.
If, in a formula, you wish to refer to an absolute box
reference which does not alter when repeated, the box
reference in the formula should be prefixed with the
character "$". Thus, for the above example, the formula
"1.03*$A1" when applied to the row A would always
refer to the contents of box A1 only.
COMMANDS
A variety of commands exist in VU-CALC for loading,
saving and printing files, for editing etc. These
commands are entered by typing "#" in the empty
input line followed by the first character of the particular
command.
# B Blank
Blanks the current box.
# C Calculate
Forces a recalculation of the whole table and is
sometimes required when a formula is changed.
# E Edit
Allows the formula referred to by the current box to be
replaced by a new formula.
# F,c,f,j Format
Format specifies the representation of a number in a
column, as defined by the three parameters c,f,j.
The first parameter c must be a one or two digit number
or the letter "A". If c is a number, the formatting will
apply to that column only, while "A" will apply the
format to All the table.
The parameter f specifies the type of formatting
required. If an I is entered, integer format will be used.
If $ ix entered, a real number with two decimal points
will be used. G specifies a general format. The third
parameter, j, must be L or R for left or right justified.
# G,rc Go
Move the cursor immediately to the box rc.
# L Load
Will clear the screen, ask for a file name and load
that file.
# P Print
Will cause a copy of the screen to be output to
the printer.
# Q Quit
Will allow the user to clear the worksheet or exit from
the program.
# R,rc,f:l Repeat
This will cause the contents of the box rc to be
reproduced across the range specified. Most
importantly, it will repeat the formula in the box rc
over the other boxes within the range specified.
The first parameter, rc, is a box reference, for example
B3, which specifies the box whose contents or formula
is to be repeated.
The box can be repeated along a row, down a column or
over a rectangular block of boxes. This is defined by the
parameter range which has the form f:l where f and l
are box references, for example A3:B5. f is the top left-
hand box of the block and l is the bottom right-hand
box of the block. In the example, the box at rrcc would
be repeated over the boxes A3, A4, A5, B3, B4 and B5,
in the range, the box f must always be to the left, and,
or above the box l.
# S Save
Clears the screen and asks the user for a file name.
The data on the table will be saved to cassette.
# T,r or c,r or c Transfer
This command transfers a row or column defined by the
first parameter to another row or column defined by the
second parameter. A row cannot be copied to a column
and vice-versa.
SUM FACILITY
Part of a row, a column, or a rectangular block of
boxes way be added automatically through the sum
facility. Summing is performed as a formula. Position
the cursor at the cell where you wish to place the
result of the summation. Enter a formula of the form
& f:l
and press the enter key. The sign "&" means sum and
the formula means "sum the boxes from the first box f
to the last box l".
f: l is the rectangular "range" of boxes over which the
summation is to be performed where f is the top left-
hand box of the rectangle. For example:
& A2:B4
will sum the boxes A2 + A3 + A4 + B2 + B3 + B4.
To sum the row C from C3 to C10 enter,
& C3:C10
To sum the column 5 from B5 to D5 enter,
& B5:D5
The box reference f must always be above and, or to
the left of box reference l.
Errors
An error will occur and the program will fail with a
Spectrum error code at the bottom of the screen if a
formula is entered which refers to a blank box or one
with characters rather than numerical data.
If this occurs, return to the program by entering GOTO
9000. The program will then display the identity of the
box which it was trying to calculate when the error
occurred. Press the key ENTER. The display will return
to the table and you may then move the cursor to the
problem square. Look at the formula for this box and
see which box the formula is referencing which
contains characters or is blank.
SUMMARY OF VU-CALC COMMANDS
# B - Blanks the current box and its formula.
# C - Forces recalculation of whole grid - required when data or a formula
is changed.
# E - To change the formula in the current box.
# F,c,f,j - Formats column c (A=All), f=I (integer), =$ (decimal),
=G (general), j=L (left), = R (right) justified.
# G,rc - Go to box rc.
# L - Load a Vu-Calc data file.
# P - Prints a copy of the screen.
# Q - Quits Vu-Calc.
# R,rc,f:l - Repeat contents of box rc over range of boxes f to l.
# S - Saves the current Vu-Calc file.
# T,r or c,r' or c' - Transfer row r to row r' or column c to c'.
(c) Copyright PSION Ltd.
Made in U.K.