|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 8448 (0x2100) Types: TextFile Names: »LESSON5.PC«
└─⟦a6ed1cd35⟧ Bits:30002862 Perfect Calc 1.10 for JET80 CP/M └─ ⟦this⟧ »LESSON5.PC«
>a1:" >a3:" Lesson5 -- Copying Between Spreadsheets >a5:" Begin this lesson by spliting the screen with the CREATE TWO WINDOWS >a6:" Command, with the cursor on line '11': >a8:" Control--x 2 >a9:" Move the cursor to the top window, using the OTHER WINDOW Command: >a10:" Control--x o (small letter 'o') >a12:" The top window should hold the sample Cash Flow spreadsheet, >a13:" 'cash1.pc', which we created in Lesson 4. Use the FIND FILE Command: >a15:" Control--x Control--f and enter'cash.pc', followed by >a16:" a carriage return. >a18:" Again, use the 'Other Window' commands to scroll the lesson in >a19:" the bottom window. >a22:" COPYING >a24:" Copying is similar to restoring and moving in that data is >a25:" transferred first to the Save Buffer and from there to the spread- >a26:" sheet. However, instead of material being 'deleted' into the >a27:" Save Buffer, it is 'copied' into the Save Buffer. No actual entries, >a28:" lines, or columns are ever removed from their original locations in >a29:" the spreadsheet, as with deleting. >a31:" Also, when an item is restored to the spreadsheet, it is not >a32:" 'inserted' between existing lines and columns, but 'overwrites' >a33:" whatever data may be present at the new location. When the operation >a34:" is complete, the data exists at both its old and new locations. >a36:" Two copy commands are used to transfer data to the Save Buffer >a37:" depending upon whether the item is a single entry or a region (i.e. >a38:" a line, column, or region). >a39:" Control--w COPY ENTRY Command >a40:" Escape...w COPY REGION Command >a42:" Two YANKBACK command forms exist to recall the data from the >a43:" Save Buffer: >a45:" Control--y YANKBACK to Single Location >a46:" Escape...y YANKBACK to Multiple Locations >a48:" Notice that, in both cases, the Control key operates upon a >a49:" single entry, while the Escape Key deals with a region of entries. >a51:" Let us suppose now that a new year has come and we wish to create >a52:" a new Cash Flow spreadsheet for the coming year. However, we don't >a53:" wish to build the spreadsheet from scratch. We want to copy as much >a54:" data as we can--labels and formulas-- from the old spreadsheet to the >a55:" new. Our first step is to create a file to hold the new spreadsheet. >a56:" With the cursor in the top window, type the FIND FILE Command: >a58:" Control--x Control--f >a60:" Supply a new file name, say 'cash83.pc'. >a62:" Perfect Calc, because it cannot find this file on disk, assumes >a63:" that it is a new file, and so activates another 'buffer' in memory to >a64:" hold it and then switches you to this buffer. The upper window should >a65:" now be displaying a blank spreadsheet in the buffer called 'cash83'. >a67:" The indicator in the lower left corner of the screen should now >a68:" display, 'cash83 a1'. This indicates the current buffer is 'cash83' >a69:" and the cursor is located in entry position 'a1'. >a71:" The old file 'cash1.pc' is still in active memory and you can switch >a72:" back to it, using the SWITCH BUFFER Command. Type: >a73:" Control--x b >a74:" Perfect Calc displays the message: >a75:" "Switch to buffer: <CR> " >a77:" Type the name of the buffer containing the old spreadsheet. Do you >a78:" remember it? Buffer names consist of the first segment of the name of >a79:" the file which they contain. The buffer holding the file 'cash1.pc' is >a80:" therefore called 'cash1'. Type this followed by a carriage return. >a82:" Perfect Calc switches the top window back to the original >a83:" 'cash1.pc' spreadsheet. >a85:" Position the cursor at the top of the first column, position >a86:" 'a1'. We are going to copy the entire first column to the new >a87:" spreadsheet in buffer 'cash83' . When copying, Perfect Calc regards >a88:" a column as a 'region' of entries. Therefore, we must first define >a89:" column 'a' as a region. >a91:" Type the MARK SET Command: >a92:" Escape...<space bar> >a93:" Perfect Calc responds with the message: "Mark Set at a1". >a94:" Move the cursor to the bottom of column 'a' using the BOTTOM OF >a95:" COLUMN Command: >a96:" Escape...> æthe cursor should be at entry 'a20'å >a97:" Copy the column into the Save Buffer by typing the COPY REGION Command: >a98:" Escape--w >a99:" Perfect Calc immediately copies column 'a' into the Save Buffer. >a100:" (There is almost no indication that this action has taken place.) >a101:" Give the SWITCH BUFFERS Command: Control--x b >a103:" This time, when Perfect Calc responds with the message "Switch to >a104:" buffer: ", simply hit the carriage return. When no buffer name is sup- >a105:" plied, Perfect Calc will switch back to the last buffer switched FROM! >a107:" Position the cursor at the top of the first column and type the >a108:" YANKBACK Command which will restore the column to a single location >a109:" in the spreadsheet: >a110:" Control--y >a112:" You will notice that column 'a' is not really large enough to >a113:" accommodate the labels, which extend over into columns 'b' and 'c'. >a114:" In the next lesson we will learn how to change column widths >a115:" so that such labels will fit. >a117:" Switch back to the previous buffer holding the old spreadsheet. >a118:" Enter: >a119:" Control--x b followed by a carriage return. >a121:" Position the cursor at the beginning of line 2, position 'a2' . >a122:" Now, using the COPY REGION procedure we will copy the two lines holding >a123:" the names of the months and the dashes underlining them. >a124:" Type the MARK SET Command (Escape...<space bar> ), establishing >a125:" an invisible mark at position 'a2'. >a127:" Move the cursor to the end of line 2 using the END OF LINE Command >a128:" (Control--e), and then DOWN one line to the end of line 3 using the >a129:" down arrow key, or Control--N. The new position (m3) of the cursor >a130:" marks the other boundary of a region encompassing lines 2 and 3. >a132:" Copy this region into the Save Buffer using the COPY REGION >a133:" command (Escape...w). >a135:" Change to the new spreadsheet using the SWITCH BUFFERS Command >a136:" (Control--x b followed by a carriage return). >a138:" Move the cursor to the beginning of line 2, position 'a2', and >a139:" restore the copied region, using the YANKBACK Command (Control--y). >a142:" In this manner we could continue copying various lines and >a143:" columns from one spreadsheet to the other. Copying is a very efficient >a144:" way of reproducing different versions of spreadsheets. >a146:" This concludes Lesson5. Before we quit it, however, let us look at >a147:" one final procedure. In this lesson we utilized multiple buffers to >a148:" hold more than one spreadsheet. Let us examine the buffers we have >a149:" been using. The BUFFER DIRECTORY Command allows us to do this. >a152:" Type the BUFFERS DIRECTORY Command: >a154:" Control--x Control--b >a156:" The 'Buffer Directory' will appear at the bottom of the screen. >a157:" As mentioned previously, buffer names are shown on the left and file >a158:" names on the right. A star or asterisk indicates that the file has >a159:" been modified but not saved. >a162:" If you wish to continue to the next lesson which deals with >a163:" 'setting up the spreadsheet as you like it', clear the memory and >a164:" use the FIND FILE Command to read in 'lesson6.pc'. >a166:" If you do not wish to continue, type the QUIT Command: >a167:" Control--x Control--c >a168:" Answer 'yes' to Perfect Calc's message "Ignore changes this session?" >a170:" END OF LESSON 5 >a1 «eof»