home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / f / perfless.ark / LESSON5.PC < prev    next >
Text File  |  1989-09-27  |  8KB  |  128 lines

  1. >a1:"
  2. >a3:"                 Lesson5 -- Copying Between Spreadsheets
  3. >a5:"    Begin this lesson by spliting the screen with the CREATE TWO WINDOWS
  4. >a6:" Command, with the cursor on line '11': 
  5. >a8:"                           Control--x  2
  6. >a9:"     Move the cursor to the top window, using the OTHER WINDOW Command:
  7. >a10:"                Control--x  o  (small letter 'o')
  8. >a12:"       The top window should hold the sample Cash Flow spreadsheet,
  9. >a13:" 'cash1.pc', which we created in Lesson 4.  Use the FIND FILE Command:
  10. >a15:"           Control--x  Control--f   and enter 'b:cash1.pc', followed by
  11. >a16:" a carriage return.
  12. >a18:"      Again, use the 'Other Window' commands to scroll the lesson in 
  13. >a19:" the bottom window.
  14. >a22:" COPYING
  15. >a24:"       Copying is similar to restoring and moving in that data is
  16. >a25:" transferred first to the Save Buffer and from there to the spread-
  17. >a26:" sheet.  However, instead of material being 'deleted' into the 
  18. >a27:" Save Buffer, it is 'copied' into the Save Buffer.  No actual entries,
  19. >a28:" lines, or columns are ever removed from their original locations in
  20. >a29:" the spreadsheet, as with deleting.
  21. >a31:"       Also, when an item is restored to the spreadsheet, it is not
  22. >a32:" 'inserted' between existing lines and columns, but 'overwrites'
  23. >a33:" whatever data may be present at the new location.  When the operation
  24. >a34:" is complete, the data exists at both its old and new locations.
  25. >a36:"       Two copy commands are used to transfer data to the Save Buffer
  26. >a37:" depending upon whether the item is a single entry or a region (i.e.
  27. >a38:" a line, column, or region).
  28. >a39:"           Control--w     COPY ENTRY Command
  29. >a40:"           Escape...w     COPY REGION Command
  30. >a42:"       Two YANKBACK command forms exist to recall the data from the
  31. >a43:" Save Buffer:
  32. >a45:"           Control--y      YANKBACK  to Single Location
  33. >a46:"           Escape...y      YANKBACK  to Multiple Locations
  34. >a48:"       Notice that, in both cases, the Control key operates upon a 
  35. >a49:" single entry, while the Escape Key deals with a region of entries.
  36. >a51:"       Let us suppose now that a new year has come and we wish to create
  37. >a52:" a new Cash Flow spreadsheet for the coming year.  However, we don't 
  38. >a53:" wish to build the spreadsheet from scratch.  We want to copy as much 
  39. >a54:" data as we can--labels and formulas-- from the old spreadsheet to the
  40. >a55:" new.  Our first step is to create a file to hold the new spreadsheet.
  41. >a56:" With the cursor in the top window, type the FIND FILE Command:
  42. >a58:"                       Control--x  Control--f
  43. >a60:"       Supply a new file name, say 'cash83.pc'.
  44. >a62:"      Perfect Calc, because it cannot find this file on disk, assumes
  45. >a63:" that it is a new file, and so activates another 'buffer' in memory to
  46. >a64:" hold it and then switches you to this buffer.  The upper window should
  47. >a65:" now be displaying a blank spreadsheet in the buffer called 'cash83'.
  48. >a67:"      The indicator in the lower left corner of the screen should now
  49. >a68:" display, 'cash83   a1'.  This indicates the current buffer is 'cash83'
  50. >a69:" and the cursor is located in entry position 'a1'.
  51. >a71:"     The old file 'cash1.pc' is still in active memory and you can switch
  52. >a72:" back to it, using the SWITCH BUFFER Command.  Type:
  53. >a73:"             Control--x  b
  54. >a74:"       Perfect Calc displays the message:  
  55. >a75:"             "Switch to buffer:  <CR>  "
  56. >a77:"    Type the name of the buffer containing the old spreadsheet.  Do you
  57. >a78:" remember it?  Buffer names consist of the first segment of the name of
  58. >a79:" the file which they contain.  The buffer holding the file 'cash1.pc' is
  59. >a80:" therefore called 'cash1'. Type this followed by a carriage return.
  60. >a82:"       Perfect Calc switches the top window back to the original 
  61. >a83:" 'cash1.pc' spreadsheet.
  62. >a85:"       Position the cursor at the top of the first column, position
  63. >a86:" 'a1'.  We are going to copy the entire first column to the new
  64. >a87:" spreadsheet in buffer 'cash83' .  When copying, Perfect Calc regards
  65. >a88:" a column as a 'region' of entries.  Therefore, we must first define
  66. >a89:" column 'a' as a region. 
  67. >a91:" Type the MARK SET Command:
  68. >a92:"                             Escape...<space bar>
  69. >a93:"     Perfect Calc responds with the message: "Mark Set at a1".
  70. >a94:"       Move the cursor to the bottom of column 'a' using the BOTTOM OF
  71. >a95:" COLUMN Command:
  72. >a96:"                   Escape...>     {the cursor should be at entry 'a20'}
  73. >a97:" Copy the column into the Save Buffer by typing the COPY REGION Command:
  74. >a98:"                   Escape--w
  75. >a99:"       Perfect Calc immediately copies column 'a' into the Save Buffer.
  76. >a100:" (There is almost no indication that this action has taken place.)
  77. >a101:"   Give the SWITCH BUFFERS Command:   Control--x  b
  78. >a103:"    This time, when Perfect Calc responds with the message "Switch to
  79. >a104:" buffer:  ", simply hit the carriage return. When no buffer name is sup-
  80. >a105:" plied, Perfect Calc will switch back to the last buffer switched FROM!
  81. >a107:"     Position the cursor at the top of the first column and type the
  82. >a108:" YANKBACK Command which will restore the column to a single location
  83. >a109:" in the spreadsheet:
  84. >a110:"                           Control--y
  85. >a112:"       You will notice that column 'a' is not really large enough to
  86. >a113:" accommodate the labels, which extend over into columns 'b' and 'c'.
  87. >a114:" In the next lesson we will learn how to change column widths
  88. >a115:" so that such labels will fit.
  89. >a117:"      Switch back to the previous buffer holding the old spreadsheet.
  90. >a118:" Enter:
  91. >a119:"           Control--x  b      followed by a carriage return.
  92. >a121:"      Position the cursor at the beginning of line 2, position 'a2' .
  93. >a122:" Now, using the COPY REGION procedure we will copy the two lines holding
  94. >a123:" the names of the months and the dashes underlining them.  
  95. >a124:"     Type the MARK SET Command  (Escape...<space bar> ), establishing
  96. >a125:" an invisible mark at position 'a2'.
  97. >a127:"     Move the cursor to the end of line 2 using the END OF LINE Command
  98. >a128:" (Control--e),  and then DOWN one line to the end of line 3 using the
  99. >a129:" down arrow key, or Control--N.  The new position (m3) of the cursor
  100. >a130:" marks the other boundary of a region encompassing lines 2 and 3.
  101. >a132:"       Copy this region into the Save Buffer using the COPY REGION
  102. >a133:" command  (Escape...w).
  103. >a135:"       Change to the new spreadsheet using the SWITCH BUFFERS Command
  104. >a136:" (Control--x  b       followed by a carriage return).
  105. >a138:"       Move the cursor to the beginning of line 2, position 'a2', and
  106. >a139:" restore the copied region, using the YANKBACK Command (Control--y).
  107. >a142:"       In this manner we could continue copying various lines and 
  108. >a143:" columns from one spreadsheet to the other. Copying is a very efficient
  109. >a144:" way of reproducing different versions of spreadsheets.
  110. >a146:"     This concludes Lesson5.  Before we quit it, however, let us look at
  111. >a147:" one final procedure.  In this lesson we utilized multiple buffers to 
  112. >a148:" hold more than one spreadsheet.   Let us examine the buffers we have 
  113. >a149:" been using.  The BUFFER DIRECTORY Command allows us to do this.
  114. >a152:"       Type the BUFFERS DIRECTORY Command:
  115. >a154:"                    Control--x  Control--b
  116. >a156:"       The 'Buffer Directory' will appear at the bottom of the screen.
  117. >a157:" As mentioned previously, buffer names are shown on the left and file
  118. >a158:" names on the right.  A star or asterisk indicates that the file has 
  119. >a159:" been modified but not saved. 
  120. >a162:"       If you wish to continue to the next lesson which deals with 
  121. >a163:" 'setting up the spreadsheet as you like it',  clear the memory and 
  122. >a164:" use the FIND FILE Command to read in 'lesson6.pc'.
  123. >a166:"       If you do not wish to continue, type the QUIT Command:
  124. >a167:"                     Control--x  Control--c
  125. >a168:"   Answer 'yes' to Perfect Calc's message "Ignore changes this session?"
  126. >a170:"                        END OF LESSON 5
  127. >a1
  128.