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

  1. >a2:"                     LESSON2 -- Entering Data
  2. >a4:"       In this lesson we will practice entering data in the Stock
  3. >a5:" Portfolio spreadsheet,  (filename 'b:stockex.pc'), which we use in 
  4. >a6:" Lesson 1.  This spreadsheet already contains some data--
  5. >a7:" labels, numbers, and formulas--but let us practice adding more, 
  6. >a8:" beginning with numbers.
  7. >a9:"    Let us begin by splitting the screen and calling up the 'stockex.pc'
  8. >a10:" file. Move the cursor to line 11 (the indicator in the lower right edge
  9. >a11:" of the screen should read 'a11' when you're there) and enter the 
  10. >a12:" CREATE TWO WINDOWS Command:
  11. >a13:"                           Control--x   2
  12. >a14:"     [Answer 'n' for "no", to the prompt "Sychronize windows?"]
  13. >a15:" Next move the cursor into the other [top] window using:
  14. >a16:"                         Control--x  o (the letter 'o')
  15. >a17:"     Use the 'Other Window' commands learned in the first lesson to
  16. >a18:" scroll the bottom window:
  17. >a19:"           FORWARD:    Control--x  Control--v
  18. >a20:"           BACKWARD:   Control--x  Control--z
  19. >a21:"     Call up the 'stockex.pc' file.  Enter the FIND FILE Command:
  20. >a22:"                   Control--x  Control--f
  21. >a23:"   When Perfect Calc responds, "File to Find <CR>: " enter the filename:
  22. >a24:" 'b:stockex.pc', followed by a carriage return.  
  23. >a26:"  NUMBERS
  24. >a27:"       Perfect Calc distinguishes a number from a label or a formula, by
  25. >a28:" the first character that you type.  That is, if the first character is
  26. >a29:" a ' - ' (hyphen, or minus sign), a ' . ' (period, or decimal point),
  27. >a30:" or any digit, 0 - 9, Perfect Calc assumes you are entering a number.
  28. >a32:"     Using an appropriate cursor command or arrow key, move the cursor
  29. >a33:" to position 'c6' and type a value for the current price of Xerox stock,
  30. >a34:" e.g. $40.  Type the number '40' (omitting the dollar sign) and hit
  31. >a35:" 'Enter' or 'Return'. (Use the DELete key to erase typing errors.)
  32. >a36:"       At the first digit Perfect Calc displays the message "Number:"
  33. >a37:" in the Prompt Line.  The number you type appears initially following 
  34. >a38:" this message.  It will not be entered into the spreadsheet until
  35. >a39:" you type 'Enter' or 'Return'.
  36. >a40:"       After you hit the 'Return' key, Perfect Calc enters the number
  37. >a41:" and recalculates the spreadsheet, displaying a value of '8000' for 
  38. >a42:" 'Current Value', position 'e6'.
  39. >a43:"       Notice that numbers are displayed showing two decimal places,
  40. >a44:" which is Perfect Calc's default display notation.  In Lesson 6 we
  41. >a45:" will see how this can be changed.
  42. >a47:"  FORMULAS
  43. >a48:"       Formulas express the relationships that exist among the data
  44. >a49:" held in your spreadsheet. For example, a formula for your home 
  45. >a50:" 'expenses' might be: Expenses = Rent + Utilities + Food.  In general,
  46. >a51:" formulas consist of numbers, variables, arithmetic operators, and/or 
  47. >a52:" functions. Arithmetic operators are the common symbols of arithmetic
  48. >a53:" that we are all familiar with:
  49. >a55:"       ^          To the power of  (e.g. 3^2 means "3 to the power of 2",
  50. >a56:"                                    or 'three squared' or 3 x 3 = 9)
  51. >a57:"       *          Multiplication
  52. >a58:"       /          Division
  53. >a59:"       +          Addition
  54. >a60:"       -          Subtraction
  55. >a61:"       Move the cursor to position 'e6', which records the 'Current
  56. >a62:" Value' of the Xerox stock.  The formula for this position, as displayed
  57. >a63:" in the Prompt Line, instructs Perfect Calc to multiply ( * ) whatever
  58. >a64:" value is contained in position 'b6' ('Number of Shares') by whatever
  59. >a65:" value is held in position 'c6' ('Current Price').  This result is then
  60. >a66:" displayed in position 'e6' ('Current Value').
  61. >a67:"      As you can see, only the value which the formula computes displays
  62. >a68:" on the spreadsheet, while the formula itself  [Formula: b6 * c6]
  63. >a69:" displays in the Prompt Line, and then ONLY when the cursor is occupying
  64. >a70:" the entry position that contains it.
  65. >a71:"       Let us enter a formula.  Move the cursor to position 'f6', which
  66. >a72:" records 'Percentage Gain/Loss'.  This entry position will hold a 
  67. >a73:" formula that will compute the percentage we have gained or lost on
  68. >a74:" our investment in this stock.  The formula will be:
  69. >a76:"                    f6 = (c6 - d6) / d6
  70. >a78:"       This instructs Perfect Calc to subtract the Purchase Price from
  71. >a79:" the Current Price, and to divide the result by the Purchase Price.  
  72. >a80:" The result will be displayed in position 'f6'.
  73. >a81:"       With the cursor at position 'f6' type an equals sign ( = ).
  74. >a82:" This tells Perfect Calc that you wish to enter a formula for this
  75. >a83:" position.  Start typing the formula now.  Again, it will be:
  76. >a85:"               FORMULA:  f6= (c6 - d6) / d6
  77. >a87:"       Blanks are ignored by Perfect Calc and so may be inserted
  78. >a88:" for readability.  If you make a mistake, use the DELete Key to backup
  79. >a89:" and retype.  As you did with numbers, type the formula at the prompt
  80. >a90:" line and then enter it onto the spreadsheet with a carriage return.
  81. >a91:"       Perfect Calc recalculates the spreadsheet displaying a result
  82. >a92:" of '-0.20' in position 'f6', indicating that a loss of 20 percent has
  83. >a93:" occurred for this stock.  Actually, percentages should be displayed
  84. >a94:" as whole numbers, not as decimal fractions.  Let us change the formula
  85. >a95:" so that it will do this.
  86. >a96:"       Perfect Calc provides a very convenient method of changing
  87. >a97:" a formula (or label) entry, which does not require retyping the entire
  88. >a98:" entry. Called the EDIT ENTRY Command, it cause the formula which the
  89. >a99:" cursor is occupying to be displayed in the Prompt Line, where you
  90. >a100:" you may change it however you wish.  To help you, Perfect Calc 
  91. >a101:" modifies several of its commands:
  92. >a103:"       Control--a   Moves Cursor to BEGINNING of Prompt Line
  93. >a104:"       Control--e   Moves cursor to END of Prompt Line
  94. >a105:"       Control--f   Moves Cursor FORWARD one character
  95. >a106:"       Control--b   Moves Cursor BACKWARD one character
  96. >a107:"       Control--d   DELETES character occupied by the cursor
  97. >a108:"       DEL Key      DELETES characters backward
  98. >a109:"       Control--g   CANCELS changes made & returns to original formula
  99. >a110:"       Return key   Enters the modified formula.
  100. >a111:"     At this time, with the cursor on position 'f6' type the EDIT
  101. >a112:" ENTRY Command:
  102. >a113:"                         Control--x  e
  103. >a114:"     Perfect Calc responds by displaying the formula in the Prompt Line:
  104. >a115:"                     EDIT: (c6 - d6) / d6
  105. >a116:"       Using the above editing commands, change the formula to read:
  106. >a118:"              f6 = ((c6 - d6) / d6) * 100
  107. >a119:"       When you have finished, enter the modified formula into the
  108. >a120:" spreadsheet using a carriage return.  Perfect Calc automatically
  109. >a121:" recalculates the spreadsheet, displaying a new value of '-20.00' in 
  110. >a122:" entry position 'f6'.
  111. >a124:"  FUNCTIONS
  112. >a125:"       Now let us consider a formula containing a simple function.  A
  113. >a126:" function is a kind of pre-structured formula which performs a
  114. >a127:" mathematical operation, and which would be difficult or time consuming
  115. >a128:" to structure ourselves.  Functions perform such operations as computing
  116. >a129:" sums, averages, square root, and so forth.
  117. >a130:"       Move the cursor to position 'e18', the entry which will compute
  118. >a131:" 'Current Equity'.  This figure, which is the sum of all values in
  119. >a132:" column 'e', will represent the total current worth of the stocks we
  120. >a133:" own.  Presently, we have only one stock, Xerox, showing a total current
  121. >a134:" value of $8000.  However, in a few moments we will be adding stock for
  122. >a135:" other companies into lines 6 through 15.  We could write our formula
  123. >a136:" as follows:
  124. >a137:"            e18 = e6 + e7 + e8 + e9 + e10 + e11 + e12 + e13 + e14 + e15
  125. >a138:"     This would give us the correct total.  However, it is an awkward 
  126. >a139:" formula, and if we add more than 8 stocks, we will have to rewrite it.
  127. >a140:"       Perfect Calc provides an answer with its 'sum' function, which 
  128. >a141:" will compute the sum of variables over a 'range'.  A range is simply
  129. >a142:" any continuous series of entry postions, whether in a line, a column,
  130. >a143:" or a rectangular area of both lines and columns.  The entry positions
  131. >a144:" 'e6' through 'e15' represent a columnar range of values.  Using the
  132. >a145:" sum function we can write our formula very concisely, as follows:
  133. >a146:"        e18 = sum(e6:e15)
  134. >a147:"   Notice that the range is enclosed in parentheses and follows right
  135. >a148:" after the function name, leaving no blank space.  As well, the range is
  136. >a149:" specified by the first and last entry positions, separated by a colon.
  137. >a151:" Enter this formula into entry position 'e18':
  138. >a152:"                   FORMULA: e18=sum(e6:e15)
  139. >a153:" Use the equal sign '=' to start the formula entry.  This entry recalcu-
  140. >a154:" lates the spreadsheet displaying a value of $8000 for 'Current Equity'.
  141. >a156:"     Perfect Calc provides a large number of built-in functions similar
  142. >a157:" to the 'sum' function.  These include virtually all of the built-in
  143. >a158:" functions found on other electronic spreadsheet programs.  However, as
  144. >a159:" we will learn in lesson8, it is possible to build a 'user-extendable'
  145. >a160:" functions library which makes the number of functions available 
  146. >a161:" virtually limitless.  Let us examine the current built-in functions
  147. >a162:" listed in the Help Menu:
  148. >a163:"             Type Help:  ?   and select '5'.  
  149. >a164:"    NOTE: To return to these instructions scroll the bottom window using:
  150. >a165:"                 Control--x  Control--v
  151. >a172:" LABELS
  152. >a174:"       The last type of data entry we will examine are labels.  Labels
  153. >a175:" are those words and symbols in the spreadsheet that identify the
  154. >a176:" various lines, columns, and entry positions.  At present there are more
  155. >a177:" labels on our spreadsheet than numbers and formulas.  Labels make
  156. >a178:" the spreadsheet not only easy to use but also aesthetically pleasing
  157. >a179:" to view.  No computations are performed on labels.
  158. >a181:"       Any printable character which does not begin a command, a number
  159. >a182:" or a formula may begin a label.  However, should it happen that a label
  160. >a183:" must begin with, for example, a hyphen, an equals sign, or a period,
  161. >a184:" which would otherwise signal a number or a formula, the label can be
  162. >a185:" 'forced' by typing a double quote ( " ) before beginning the label.
  163. >a187:"       Move the cursor to entry position 'a7' and type the label 'IBM'.
  164. >a188:" As with numbers and formulas, the label is displayed initially in the
  165. >a189:" Prompt Line following the message:  "LABEL:  ".  Instead of entering
  166. >a190:" the label with the return key, use the FORWARD Command (Control--F).
  167. >a192:"      Notice that Perfect Calc enters the label, and then moves the 
  168. >a193:" cursor right one column position, where it is ready to receive a 
  169. >a194:" numeric value for 'Number of Shares'.
  170. >a196:"     Make up and enter sample numbers for IBM stock.  Each time a number
  171. >a197:" is entered, Perfect Calc recalculates the spreadsheet. When you have
  172. >a198:" finished with IBM, enter stock holdings for other companies, such as
  173. >a199:" General Motors, Bank of America, Georgia Pacific, etc.
  174. >a201:"       Once the data has been entered, change the 'Current Price' for
  175. >a202:" various stock, observing how Perfect Calc automatically recalculates
  176. >a203:" the current value of your stock holdings, your percentage gain or loss
  177. >a204:" for each, and your current equity.
  178. >a206:"       THIS is the power of Perfect Calc!
  179. >a208:"       When you have finished, and if you wish to continue to the next
  180. >a209:" lesson, which deals with storing and printing the spreadsheet, simply
  181. >a210:" clear the entire memory and read in the 'lesson3.pc' file.
  182. >a211:"     The CLEAR ENTIRE MEMORY Command is:  Control--x  Control--k
  183. >a213:"     The FIND FILE Command is:  Control--x  Control--f
  184. >a215:"       If you do not wish to continue with the lessons now, type the
  185. >a216:" QUIT Command:
  186. >a217:"                Control--x  Control--c
  187. >a218:"     Answer 'y' for yes to Perfect Calc's question:  "Ignore changes
  188. >a219:" this session?"
  189. >a220:"                      END OF LESSON 2
  190. >a1
  191.