• Keine Ergebnisse gefunden

Changing Windows and Titles

Im Dokument 1/83 (Seite 65-68)

As we found in LessonTwo, the screen is too small to display both our starting expense figures in month 1 and our calculated totals and percentages in columns Nand O. We can solve this problem by splitting the screen into two windows.

VisiCalc Changing Windows and Titles With the cursor still at N13, press /WV Your screen should look like the photo below. The titles in column A and rows 1-3 are fixed in place in both windows.

Press; to jump the cursor over to the right window, bringing columns A and N into view. Then press /TN to eliminate the fixed titles from the window in which the cursor rests. The title or "border" column A disappears, exposing column M. Finally, press. once to bring the TOTAL and PERCENT columns Nand 0 into view.

Notice that columns are slightly narrower in this window. VisiCalc automatically adjusted the column widths to make room for the extra vertical border of row numbers that runs down the center of the screen.

Now press; to jump the cursor back to the left window. Press and hold down

• to scroll this window back'to the first month (column 8). Notice that you bump into column A. The fixed titles are still in effect in this window. Your screen should look like the screen photo below.

The @NA and @ERROR Functions Lesson Three

Let's try changing one of our expenses to see how VisiCalc recalculates the expense totals and income percentages. Type >B9®100® What happens?

Your available LEISURE money decreases by $20 each month. The CAR EX-PENSE total goes from $960, or 4% of your income, to $1200, or 5% of income.

And your LEISURE total for the year goes from $5150, or 22% of income, to

$4910 or 21%.

The @NA and @ERROR Functions

Press ... to move to position 810. Let's suppose that you were about to change your car insurance policy, and the new premium was not yet known. VisiCalc has a special function to help you deal with just such problems: the @NA func-tion (@NA stands for "Not Available"). Watch the screen as you replace the number 160 at 810 by typing @NA®

When you write this function at an entry position, that entry takes on the special value NA. When VisiCalc recalculates, any formula which refers to an entry containing NA will itself have a value of NA. In this case, your car in-surance premium for month 1 at 810 became Not Available. 8ecause of this, you had no way to calculate your leisure money (income minus the sum of ex-penses) for month 1, and so position 813 (for LEISURE) became Not Available.

Moreover, your total car insurance expense for the year could not be calcu-lated and also became NA, which meant that the corresponding percentage of income became NA. And, since one month's LEISURE expense was NA, the total was NA, and so was LEISURE as a percentage of income. Change 810 back by typing 160® and all of the calculated values will be restored.

Here's a related issue: suppose that, instead of typing a number, you were try-ing to calculate your own car insurance premium as the insurance company does, but you made a mistake and tried to divide by zero.

VisiCalc

The Insert and Delete Commands With the cursor still at B10, type 1/0 ® As the screen shows, when VisiCalc evaluates the formula 1/0, the result is the special value ERROR. Like NA, the value ERROR "propagates." Any formula which refers to an entry with the value ERROR will itself have the value ERROR.

The most common ways to obtain a value of ERROR include dividing by zero, taking the logarithm of a negative number, and calculating a value too large for the computer to represent. ERROR can also be generated as a syntax error from an expression. For example, VisiCalc would reject a range attached to NPV as an invalid argument.

You can also deliberately obtain the value ERROR, just as you did for @NA, by typing the function name @ERROR. In fact, it can be used as a variant of @NA or as a debugging tool when working with lookup tables. For now, change the value at B10 back by typing 160 ® so that the totals and percentages can be calculated.

To make sure that we can continue from this point if something goes wrong, let's save the sheet on diskette again. The storage diskette that you used earlier in this lesson should still be in your disk drive. Type ISS and, in response to the prompt F I L E FOR S A V I N G, press the. key.

The disk drive should whir, and a file name should appear on the edit line. Con-tin'ue pressing the. key, if necessary, until you have the name LSTHREE1. VC on the edit line. Then press the BACK S key four times until the small rectangle is sitting where the 1 was. Now type 2® and watch the edit line as you type the characters. You are saving the sheet under the revised name LSTHREE2.VC. Note: VisiCalc will automatically add the ".VC" for you. Once you've started, all it takes is a few keystrokes to protect yourself from loss of window, the screen would now have fixed titles and columns nine characters wide.

For now, type IGC9® and >A7® to adjust the column widths and scroll the screen back to the left edge of the sheet. The cursor should highlight the label FOOD.

Im Dokument 1/83 (Seite 65-68)