Tape only systems
Disc Systems
Grid, Cursor and Window
The
Main Command Panel
Entering
Text
Entering
Data
Entering
Formulae
Replicating
Transfer
and Blank
Cell
Formats
Saving
and Loading Worksheets
Printing
the Worksheet
The Grid
Formulae
Commands
Home Budget
The
Teacher's Problem
VU-CALC is supplied on cassette tape and was recorded at 1200 baud (this is the default filing system if you do not have a disc connected), VU-CALC is written in machine code so you need to use a * command to load, run or save.
Load and run VU-CALC with the command!
*RUN
VUCALC
and then start the tape playing.
You can save VU-CALC on disc by loading VU-CALC from tape and then saving on disc as follows:
*TAPE12
(selects the 1200 baud cassette filing system)
*LOAD
VUCALC (loads VU-CALC from tape)
*DISC
(selects disc file system)
*SAVE
VUCALC 1900+ nnnn 34DO (save to disc)
Where
nnnn is the length of the file as displayed by the *LOAD command.
Subsequently,
you can run VU-CALC by entering (from the disc filing system):
*VUCALC
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 cells and arranged in rows and columns. With a simple set of commands you can invoke calculator-like formulae which link one cell 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 cells 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.
VU-CALC is a powerful and sophisticated program which will take the average beginner with no previous experience of this type of program several days to learn to use effectively and several weeks to use with any high level of skill. Unless you are very familiar with this type of program, you should work through the next section (LEARNING VU-CALC) while carrying out the commands on your computer, as suggested in the text. After you have been through this manual, set up a simple example of your own. If you have not used this type of program before, don't dive off the deep end with a complicated application but think of a simple example which interests you and start with that.
If you get into a mess...
While you are learning how to use VU-CALC and entering all manner of things, you may at times wish to start afresh to avoid falling fowl of previous mistakes. The simplest way of doing this is to first exit with the command # Quit (press # (SHIFT-3) then press Q then press Y) which will return you to BASIC. If you have a disc system it is convenient to simply run again with *VUCALC. However this is tedious with a tape system and you can achieve the same effect by entering:
CALL &34D0
which will take you back into VU-CALC. Try it!
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 on to the table or grid. The table can be thought of as a large number of cells ordered into rows and columns. Each cell is 9 characters wide and there are no gaps between the cells except for a moveable horizontal gap to accommodate a cursor. The rows are labelled alphabetically and the current rows shown in the window can be seen down the left-hand margin. The column 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 cell is uniquely identified by the row letter followed by the column letter. Thus, A01 or A1 refers to the cell 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 cell which has a dotted line (cursor) underneath it. The cursor can be moved freely and
rapidly to read or enter data, text or formulae. The cursor is moved over the table by pressing one of the four arrow cursor keys on the right of the keyboard. The cursor may be moved rapidly by holding down one of the arrow keys firmly.
When the cursor reaches a cell 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, you can move rapidly round a very large table (try it).
There is an even faster way of moving around the grid using the command Goto (more about commands later). Press # (SHIFT-3) and the command panel will change to give a list of available commands. Press G for Goto and the command panel will change again, prompting you for cell address to Goto. Enter a cell address (e.g. J9) and the cursor will immediately go to that cell.
VU-CALC is a thinking spread-sheet in which you can layout text, numerical data and formulae. At the main command point of VU-CALC, 4 types of entries may be made: text, data (numbers), formulae or a command. The main command panel tells you how to distinguish between these options:
command start with #
text starts with "
data
and formulae are entered directly.
To enter text, position the cursor at the cell where you wish to start the text. Press " and the command panel will change to display the prompt "ENTER text and then press return". 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 block cursor on that line moving along. You may fill the whole line and use the DELETE key to make alterations (deleting the whole line including the initial " will return you to the main command panel). When complete, press RETURN to insert the text on to the spread sheet. You can use both upper and lower case letters.
Try entering text and satisfy yourself that text which is shorter than 9 characters appears right justified in a eel! (this can be changed by using the command # Format and will be described later) and that character strings longer than 9 characters can be entered which continue across into adjoining cells in a sensible fashion.
To enter a number in any cell, simply position the cursor where you wish to enter the number and type in the number, As soon as you press the first number key, the command panel will change to inform you that the program is expecting either a number or a formula VU-CALC will be able to distinguish between the two so there is no special character that you have to press. Before pressing RETURN, you are free to change the number using DELETE and deleting the whole number will return you to the main command panel. When you press the RETURN key, the number will be shown in the current cell.
Try entering some numbers to learn how VU-CALC treats your input. Integers shorter than 9 characters get entered right justified. Decimal numbers lose their decimal parts and are rounded down to the nearest integer (this behaviour can be changed by using the # Format command). It is dangerous to use numbers which are too near the maximum 9 character length. Humans can not really appreciate 9 significant figures (3 to 4 is more realistic), so if you find that the numbers from your application are turning out too long then change you units. Enter a number which is
longer than 9 characters (e.g. 12343567890) and you should see
********* actually entered to warn you of an overflow.
If you enter a string of character: which does not start with a quote(") or a hash( # ) and which is not a simple number, then VU-CALC will assume that you have entered a formula and will immediately attempt to calculate that formula and place the result in the cursor cell. If you entered an invalid formula or if you did not mean to enter a formula at all (often happens when you forget to start a text siring with a ") then you will get an error message in the command panel which will give you the cell reference of the cell which would have taken the result and prompt you to "press any key to continue
Try entering a simple formula like 1 + 1. Notice that you get the result of the formula in the cursor cell and that the formula itself appears on a line near the bottom of the screen, above the entry line and below the window on the grid. Move the cursor away from its present cell and back again and observe how the formula disappears and reappears from the formula line.
Entering a formula causes the following sequence of events: (1) that formula is added to the formula list, (2) a flag or pointer is set for the cursor cell which causes the contents of that cell to be controlled by the formula and (3) a calculation is forced to evaluate the formula and place the result in the cursor cell. With the cursor back to the cell which contains" our formula, enter the number 1 (i.e. press key 1 then RETURN). The result of the formula has been overwritten by this number, Now enter #C (press # then C then RETURN) for calculate and the number will be replaced by the result of our formula. Formulae take precedence over numbers or text and there is generally no point in entering anything into cells which are controlled by formulae.
It is unlikely that anyone would wish to enter formulae as trivial as 1 + 1, but it and other simple formulae suffice to demonstrate how formulae work in VU-CALC. It is bad practice to re-enter a formulae when you wish to modify a formula. A formula should only be modified by using the #Edit command To edit a formula move the cursor to any cell which is controlled by that formula and enter #E (press # then E). Before you have time to see the "E" echoed on the command line, the command line will be cleared and the command panel will change to display EDIT Enter the new formula". Enter the new formula followed by RETURN. Notice that #Edit forces a new calculation of the cursor square.
Use #Edit to change the formula and confirm that you can use the normal functions *, /, +, for multiply, divide, add and subtract and that you con use brackets to change the order of calculation. In fact VU-CALC uses the BASIC formula evaluator, so you can include the normal BASIC functions in your formula, although most of these are unlikely to be useful for most applications of VU-CALC. Among the more useful however are SQR for square root and ^ for raising to the power of.
The real power of VU-CALC comes from including the contents of other cells in formulae in a similar way to using variables in BASIC. The command #Calculate scans through the whole grid from top to bottom taking each row from left to right. It is bad practice, and often leads to errors, to use a cell in a formula which has not yet been calculated in the calculation scan.
Put the number 100 in C3, Then go to C4 and enter the formula:
%C3+1
and you should see the result 101 in cell C4. Change the contents of C3 to 99 and then calculate with #C to obtain the new result The percent sign % which prefixes the cell preference tells VU-CALC to expect a cell reference and also serves to distinguish
between two types of cell reference
relative and absolute. The %prefix indicates a relative cell reference and
a $ prefix indicates an absolute cell reference. The distinction between the
two types of reference becomes significant when a formula controls more than
one cell (almost always true). This distinction will be explained fully below
when the # Replicate command is described. As a rule, when in doubt use
% for relative. Typical formulae are shown below;
%B1*1.03
%D12*(%B2
+ 1.5)/$C1
%D7%C7
The most useful construct that can be used in formulae is that for calculating the sum of a row, column or an array of cells. There are many useful applications which use this type of formula exclusively. Clear the grid by using #Quit to return to BASIC and then enter CALL &34D0 to return to VU-CALC. Put the number 100 in cells C3, D3 and E3. In F3 put the formula @C3:E3 and you will get the sum C3 + D3 + E3 in cell F3. The @ sign in formulae is used as a prefix to indicate a sum. Immediately following the @ is a range consisting of two cell references separated by a colon. Put 100 in C4 and C5. Then enter the formula @C3:C5 into C6 to calculate the sum of the row C3 to C5. Now put 100 in D4, D5, E4 and 35 and then enter the formula @C3:E5 into cell F6 which calculates the sum of the array defined by C3:E5. From these examples you might have gathered that the range f:I defines an array of cells where f is the top left cell and I is the bottom right. Rows and columns are special cases of arrays where for a row f to I goes from left to right and for a column f to I goes from top to bottom. Other commands ( #Blank, #Print, #Replicate) use ranges.
VU-CALC is a program which works on tables and we will now look at a command which is closely related to the table structure of VU-CALC. Clear the worksheet by # Quitting and reentering VU-CALC. Enter 100 in C3 and leave the cursor at C3. Press # then R for Replicate and the command panel will change to prompt you to Enter the cell to replicate". You can enter the required cell reference (C3) in two ways either directly by typing C then 3 then RETURN or more conveniently in this case by just hitting RETURN for the cursor cell. On pressing RETURN, the command panel will change again to prompt your for the range over which the data is to be replicated". The syntax for the range is the same as that for the sum (@) construct in formulae and consists of two cell references separated by a colon. Enter C3:E5 and the bottom command line should read R,C3,C3:E5 which, incidentally, does not reflect the actual input (you did not enter the commas or the first C3) but does give an indication of what the command will do replicate C3 over the array C3 to E5. Press RETURN and confirm this.
The #Replicate command is used to replicate the contents of any one cell over an array of cells. Remember that rows and columns are just special cases of arrays and in practice it is more often the case that the array will be a row or a column. There is a further special case of an array which was not covered by the discussion of the sum facility: that of a single cell. There is no point in summing a single cell but there is a point in replicating from a cell to another single cell. Transfer the contents of C3 to K2 by entering R, C3, K2. (You do not press any commas if you type in the C3 then you get the second comma by pressing RETURN).
To summarise the syntax of the #Replicate command, the first grid reference gives the cell to be replicated and the second grid reference range gives the target cell, row, column or array which is to take the duplicates of that cell. To replicate C3 over 13 to 19, enter #R,C3,13:19. To replicate C3 over the column D10 to l10, enter #R,C3,D10:I10.
We have used the #R command to replicate
numerical data but it can also be used
to replicate text and formulae. Replicating
text does have its uses. Suppose that you want to make your spreadsheet more
readable by drawing a line of "" characters across the grid, say,
from L1 to L15. Move the cursor to L1 and enter to fill
the cell with 9 dashes. Then use the command #R,L1,L2:L15 (press #R RETURN
L2:L15) to repeat across to L15.
A great deal of the power of VU-CALC comes from replicating formulae especially when relative cell references are used. You do not need to differentiate between replicating formulae and cell contents when using the #Replicate command as the command will automatically replicate both. On calculation (#Calculate command), the result of any formula will overwrite any previous data so there is a natural precedence to replicating formulae. At this stage it is important to understand the difference between absolute cell references (prefixed with a $) and relative cell references (prefixed with a %). Clear the grid by quitting and re-entering with CALL &34D0 or *VUCALC. Put 100 in A1 and B1. Put the formula %A1+ 1 in A2 and then replicate across with #R,A2,A3:A20. Now put the formula $B1+1 in B2 and replicate across with #R,B2,B3:B20. Can you tell the difference? Move the cursor along row B and note that the formula (shown above the command line) does not change. Do the same along row A and note that the formula does change.
A relative cell reference is interpreted relative to the cell which is to take the result whereas an absolute cell reference always refers to the same cell. Hence, the A1+ 1 which was entered in A2 really means add one to the cell immediately to the left and the B 1 + 1 entered in B2 means add one to the cell B2 regardless of where the result is to be placed.
Relative formulae are extremely useful in VU-CALC because tables are by their nature repetitive and the concept of referring to the cell to the left or the cell above etc. is far more useful in tables than referring to a particular cell. Relative references in formulae are used far more commonly than absolute references and it is quite possible to use VU-CALC without absolute references at all. However they are occasionally essential depending on your application. As a rule, if you are unsure which type of reference to use, use relative (%).
We have used a cell reference without either a $ or a % when the sum (@) facility was described. The @ symbol on its own is taken as implying a relative reference and you can specify an absolute reference by putting a $ immediately after the @. For example put the formula @$A1:B1 in C1 and then replicate across with #R,C1,C2:C20. This is less useful than the default relative form. If the cursor is not at C1, move it there and #Edit the sum formula and modify it to the relative form @A1:B1. Note that the contents of the whole of row C do not change because #Edit only forces a calculation of the cursor cell. Force a complete calculation with #C and note that row C has now changed. Move the cursor along row C and confirm that the #Edit command changed all the formulae along row C even though you only edited the formula in Cell C1.
It is important to understand the true nature of replicated formulae. The logical nature of the relationship between formulae and the grid is best understood through an insight into the physical implementation of formulae in VU-CALC. Although we speak of placing formulae in cells, replicating to other cells and editing formulae in cells, there is not a space for a formula in each cell. Rather there is a separate list of formulae and a pointer in each cell which either points to no formula at all or which points to one of the formulae in the list. When we first enter a formula, the formula is added to the formula list and a pointer is provided from the cursor cell to that formula. When a formula is replicated, no additional formulae are added to the formula list but pointers are provided to the appropriate formula in the list. When a formula is modified using #Edit, the one and only copy of that formula is modified and so all other cells which are controlled by that formula are automatically affected.
The command #Transfer can transfer the contents of a row or a column to another row or column while keeping the original row or column intact. It does not transfer formulae (or more correctly the pointers to formulae). Transfer is particularly useful for transferring labels either because you want them moved or because you wish to repeat labels over the grid. For example, in a home budget sheet, you might have the labels Gas, Elec., Phone etc. down the left hand side and Months Jan, Feb, Mar etc. along the top. The #Transfer command could be used to put a copy of the left hand labels on the right of the table and a copy of the month labels at the bottom of the table. If you just want a row or column moved then you can use #Blank to erase the original row or column.
Use the #Repeat command to put a line of" = = = = = = = = = across row H, say from H1 to H20. We will transfer this row to row L. Press # then T and the command panel will change to prompt you for the row or column to be transferred. Press H followed by RETURN and the command panel will change again to prompt you for the destination row. Press L followed by RETURN to perform the transfer. There is no essential difference to tranferring rows. You cannot transfer a row to a column or vice versa.
You can remove the line of text from row H using the #Blank command. Move the cursor to H1 and press # then B and the command panel will change to prompt you to either enter the range to be blanked (followed by RETURN) or just to press RETURN to blank the current cell. Just to try it out, press RETURN to blank H1. Now get rid of the whole line with # B,H1:H20.
The #Blank command does remove formulae from cells (or more precisely, removes the pointers to formulae from cells). Indiscriminate blanking of formulae can waste formula list space. On no account should formulae be modified by blanking and reentering the #Edit command should be used. For the same reason, you should not start again by blanking the whole grid use #Quit and then reenter with either *VUCALC or CALL &34D0.
The cell format defines the display format and justification of numbers and the justification of short (less than ~ characters) text strings. On entering VU-CALC, a right justified integer format applies the whole grid. The #Format command may be used to modify this format over the whole grid or independently over columns.
The justification of text is not retroactive only text entries following the #Format command are affected. Clear the worksheet and enter the text "XXX in A1 and the number 100 in A2. They will appear right justified with leading blanks. Now press # then F then A then RETURN twice then L (for left justification) and finally RETURN again. The 100 should now be left justified with trailing blanks and the XXX will be unaffected. Enter "XXX in B1 and XXX will be entered left justified. Press # then F and the command panel will change to prompt you for a column number or an A for ALL for the whole grid. We pressed A last time but this time press 2 (for column 2) followed by RETURN. The command panel will change again to prompt for the number display format $ for 2 decimals places (often used for currency); G for general format (as many decimal points as required consistent with a 9 character total width); I for integer format.
Just pressing RETURN gives the default integer format and is eqivalent to pressing I then RETURN. This time, press $ for "currency" format then press RETURN. The command panel will change yet again to prompt for left or right justification the options are L or R, respectively, followed RETURN or just RETURN for the default R. Just press RETURN and you should see the 100 in A2 become right justified with two
decimal points. For obvious reasons,
integer format numbers and $ format numbers are normally displayed right justified.
Enter the command #F,ALL,G,R (#, F, A, RETURN, G, RETURN, RETURN). Put 100.1 in B2 and B3 and it should be clear that the G format is not retroactive and that a #F, ALL,... overrides previous formats set for particular columns.
A warning about large numbers. We saw earlier that if you attempt to enter an integer of more than 9 characters that VU-CALC inserts a string of *'s to warn you of an overflow. This does not always work when numbers set too big because the BASIC evaluator might convert the result to exponential format and the exponential part may or may not appear in a cell. VU-CALC was not designed to handle numbers which are very large or very small and you should be able to choose your units such that the numbers produced fit the 9 character limitation. However very large or very small numbers may be produced by an erroneous formula and you should be aware of this behaviour when using VU-CALC.
Do not confuse saving and loading the worksheet with saving and loading programs. To continue working on a table which had been saved from a previous VU-CALC session, you would normally *RUN VUCALC and then use the #Load command from the main command panel to load the required worksheet. You may modify the worksheet and wish to save the new sheet either replacing the original (same file name) or creating a new file (different file name, possibly different cassette/disc). As you work with VU-CALC you should save the worksheet to tape or disc at regular intervals just in case you accidentally lose power or accidentally blank most of your table. You will find out that it takes quite a significant amount of typing to lay out the text (titles and labels) and it is a good idea to enter all the text first and save the sheet permanently so that you never have to enter that text again.
To save the worksheet, press # then S and the command panel will change to prompt you for the file name (up to 10 characters for tape systems and 7 characters for disc). It will take some time to save to tape the whole grid is saved regardless of whether there is data on the grid or not. After saving, you are returned to the main command panel.
To load a previously saved worksheet, press # then L and the command panel will change to prompt you for the file name. Type in the file name followed by RETURN and start the recorder if you have a tape system. You will be returned to the main command panel when the file has loaded. You can abort #Load by hitting BREAK.
If you have a printer connected to your computer then you can print an array of cells from the worksheet, with or without the border (the cell references along the top and left hand side of the grid). Press # then P for print and you will be prompted for the range to be printed. This should consist of two cell references separated by a colon which defines the top left cell and the bottom right cell of the array to be printed. This takes the same form as the range in sum(@), #Replicate and #Blank. After typing the range, press RETURN and the command panel will change to prompt you to enter B or N for a border to be printed or for no border to be printed, respectively, followed by RETURN. (Just pressing RETURN is equivalent to pressing B then RETURN.) The command panel will change again to prompt you for the paper width. This depends upon your printer and is typically 80 columns. Some printers can be set to print condensed character fonts which can give you significantly more than 80 columns which allows you to print more columns in one go. Either enter the appropriate number followed by RETURN or just RETURN for 80 columns. The printer should now start printing. If you do not have a printer connected, you can get back to the main menu by hitting BREAK.
The grid is organised into 28 columns labelled 1 to 28 and 52 rows labelled A,B,C, ,Y,Z,AA,AB, AY,AZ. A particular cell is referred to by the row reference followed by the column reference. For example,
A1 A01 J23 AW12
are valid cell coordinates. Each cell in the grid is 9 characters wide. The cursor cell has a dotted line (the cursor) underneath it. The cursor may be moved to adjoining cells by hitting one at the arrow keys to the right of the keyboard. Holding a cursor key down will cause the cursor to move rapidly in the appropriate direction. Only a small portion of the grid (the window) is displayed on the screen. When the cursor hits the edge of the window then the window will move over the grid until the edge of the grid is reached.
On entering VU-CALC, the main command panel is displayed on the top two lines. The bottom line is used to reflect the keyboard input and the line above is used to display a formula which controls the cursor cell, provided that cell is controlled by a formula. From the main command panel, four types of entry are possible: (1) a command (starts with a #); (2) a text entry (starts with a "); (3) a number (consists of decimal digits with an optional decimal point); (4) a formula (a valid BASIC expression which is not a simple number).
Formulae may refer to the contents of other cells by including the cell reference preceded by either a % (to indicate a relative reference) or a $ (to indicate an absolute reference). Formulae may also include a sum construct consisting of a @ (relative) or @ $ prefixing a range of cells. A range defines an array of cells by the coordinate of the top left hand cell and the coordinate of the bottom right hand cell. For example, A12:F20 AL4:AR8 D5:D25 F4:AB4 G4:G4
are
all valid ranges, and
@F3:J10
@AZ3:AZ8 @$R3:AC3
are valid sums.
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. The command input is reflected along the bottom line of the display but this is not a straight forward copy of the keys pressed commas are added for readability. As each section of the command is typed in, the command panel changes to prompt for the next section of information required. Pressing RETURN either passes on to the next section or, if the command is complete, carries out the command.
The commands will now be described in alphabetical order.
BLANK #B,f:1 or #B,
Blanks the cursor cell or the specified row, column or array of cells. The range f:I defines a row, column or array where f is the top left cell and I is the bottom right cell. Blanking removes text and numerical data from the affected cells and also releases cells from the control of formulae. Beware of losing formulae and formula space with this command.
Examples:
#
B, Blanks the cursor cell.
#
B,C3:G8 Blanks the array C3 to G8.
# B,Al;AZ1 Blanks column 1.
CALCULATE #C
Causes the whole grid to be calculated or re-calculated. The cells in the grid are scanned line by line from top to bottom going from left to right within each line. It is bad practice and usually an error if a formula refers to a cell which has not yet been calculated or for a formula to refer to itself (eg, %F5+ 1 in cell F5) such that the result depends upon the number of calculations. This command may take some time to execute especially for complex grids.
If the calculation fails, then an error message will appear in the command panel which will give the coordinate of the cell which was to take the result of the erroneous calculation.
EDIT # E
Used to edit (i.e. modify) the formula controlling the cursor cell. Affects all cells under control of that formula but only forces a recalculation of the cursor square and so it is a good idea to #Calculate after #Edit. Never modify a formula by simply re-entering the formula over the old one.
FORMAT #F,c,f,j
This command is used to specify the way in which numbers and text are presented on the grid. The format can be specified for the whole grid or for individual columns in the grid. Text and numbers may be left or right justified within their cells and numbers may be printed in anyone of three different formats. The options c,f,j stand for column, format and justification. c may be a column number to be affected or A (for ALL) for the whole grid to be affected. #F, ALL,... commands override previous column-specific formats. f defines the format and may be any one of:
I for integer format where any fractional parts are truncated.
G for general format where as many decimal figures are displayed as is required within the restrictions of the size of the cell.
$ for dollar format (2 fixed decimal places) which is typically used in financial applications.
Finally, j specifies the justification which may be either L or R for left or right justification.
Examples:
#
F, ALL, $, R sets right justified dollar format over the whole grid.
#
F,3,1, L sets left justified integer format over column 3 only.
GO #G,rc
Used to move the cursor to a specified cell. This command is useful as an alternative to the arrow keys when moving the cursor large distances across the grid.
Example:
#
G, AZ12 moves the cursor to cell AZ12
LOAD #L,fff
Load
the worksheet file with filename fff from tape or disc, depending on the active
file system.
PRINT #P,f:I,b,w
Print the array of cells f:I, with or without border (b) to a printer which can print w columns. The border switch b can either be B to include the border or N not to include the border. The range f:I defines an array of cells where f is the coordinate of the top left cell and I is the coordinate of the bottom right cell.
Example;
#P,A1:AZ9,N,80 Print columns 1 to 9 without the border to
an 80 column printer.
QUIT #Q,Y
Quit the worksheet and return to BASIC. The contents of the worksheet are lost by this command and so the #Save command should be used before quiting if a record of the worksheet is required.
REPLICATE #R,rc,f:I
This will cause the contents of the cell rc to be reproduced across the range specified. Most importantly, it will replicate the formula in the cell rc over the other cells within the range specified. The first parameter, rc, is a cell reference which specifies the cell whose contents or formula is to be replicated.
The cell can be replicated along a row, down a column or over a rectangular block of cells. This is defined by the parameter range which has the form f:I where f and I are cell references where f is the top left-hand cell of the block and I is the bottom right-hand cell of the block.
Examples:
#
R, D3, D4: D20 Replicate the contents of D3 over the row D4 to D20.
#
R,C20,C21:AC21 Replicate the contents of C20 over the column C21 to AC21.
SAVE #S,fff
Saves the current worksheet to tape or disc, depending on the active file system. The filename fff may be up to 10 characters long for a tape system and up to 7 characters for a disc system.
TRANSFER #T,n,m
This command transfers a row or column defined by the first parameter n to another row or column defined by the second parameter m. A row cannot be copied to a column and vice-versa.
Examples:
#T,
D,Z Transfer the contents of row D to row Z.
#T,20,1
Transfer the contents of column 20 to column 1.
In this example, we will consider without going into too much detail an application which might be most useful to a teacher but will nevertheless demonstrate the power of the VU-CALC to those with no interest in this particular example. Suppose that a teacher has the exam results of a particular class in many different subjects and wishes to scale the results for a particular subject up or down by a given factor in order to produce a complete set of results which have a reasonably consistent average across different subjects. The teacher could use VU-CALC to solve this problem along the following lines: going across row C, say, starting at C3 one could put the names of the pupils in the class. In E1 we might put the subject Maths and in G1 English and so on down column 1 for all the subjects leaving a row between each subject. In row E, G etc under the pupils' names, we would put the actual marks given by the teachers who marked the papers. In F1, H1 etc we could put a scaling factor for Maths, English etc which we will use to give the desired scaled marks. Initially we will place the number 1 in cells F1, H1 etc. In F3 we would put the formula $F1*%D3 and then use replicate to replicate this across row F for as many columns as there are pupils. We could then take a similar action in row H for English etc down to as many rows as we have subjects. At the right-hand edge of the table in a column to the right of the last pupil column we could put a formula for the average mark which might be @E3:E22/20 assuming that there are 20 pupils. This formula can then be replicated down to provide averages and scaled averages for each subject. In a row beneath the last subject row we could put a similar formula for the average mark of each pupil across the subjects. The model has now been set up and now the scaling factors which were originally set to 1 can be altered to give the desired average for each subject and immediately (upon entering #C for calculate) the effect can be seen on the pupil averages.
This is a classic example of the "try it and see" capability of VU-CALC where changing one number effects many others. Without a program of this type it would be extremely tedious to change a scaling factor and have to recalculate all the averages involved.
Many users waste large amounts of formula space by either reentering formulae instead of using the #Edit command or failing to appreciate the power of the #Replicate command. It is a good idea to keep a record of the formulae entered and consider, whenever a formula is required, whether that formula already exists and can be replicated to the required cell. Formulae are more likely to be generally useful if they refer to a cell relatively and so relative formulae should be used in preference to absolute formulae in situations where either would do.
It is important to appreciate the scanning sequence of the #Calculate command (left to right for each row and then top to bottom). Formulae which reference cells which are controlled by formulae which have yet to be evaluated (this includes a formula which references the cell which is to take the result) will generally give a different result each time a calculation is performed and is to be avoided.
Integer format truncates down to the nearest integer. If the result of a formula is 0.95, say, then this will be displayed (and stored) as zero. If you are likely to get fractional result and if that fraction is significant then you should use either G or $ format.