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

  1. \dg36
  2. >a3:"        LESSON6 -- Setting Up the Spreadsheet As You Like It
  3. >a5:"       In this lesson we will examine some command procedures that you
  4. >a6:" are sure to appreciate:  justifying entries within their columns;
  5. >a7:" changing column widths to accommodate large or small data elements;
  6. >a8:" and changing the display format (Perfect Calc allows you to display
  7. >a9:" numeric values as whole numbers, decimals, dollars & cents, as well
  8. >a10:" as graphically).
  9. >a12:"       For this lesson, we will be creating a spreadsheet from scratch.
  10. >a13:" Our first step is to split the screen horizontally and move the cursor
  11. >a14:" to the top window.  To do this position the cursor at 'a11' and give
  12. >a15:" the following commands:
  13. >a17:"       Control--x  2       CREATE TWO WINDOWS Command
  14. >a19:"       Control--x  o       Switch to OTHER WINDOW Command
  15. >a22:"       In the top window create a new file by giving the FIND FILE
  16. >a23:" command:  (Control--X  Control--F) .
  17. >a25:"       Ask to find the new file 'b:sales.pc' .
  18. >a27:"       Perfect Calc displays an empty spreadsheet.  We will build this
  19. >a28:" spreadsheet showing monthly sales figures for a business.  It will look
  20. >a29:" like this:
  21. >a31:"   |     a        ||     b     ||c||     d      ||      e
  22. >a32:"  1  Month             Sales            Graph
  23. >a33:"  2  -----             -----            -----
  24. >a34:"  3 January           152,000.00
  25. >a35:"  4 February          133,854.00
  26. >a36:"  5 March             141,000.59        {NOTE: This is a text file, it
  27. >a37:"  6 April              82,000.00        contains no data that can be 
  28. >a38:"  7 May               198,000.00        copied.  Also, when copying 
  29. >a39:"  8 June              305,000.00        be sure NOT to enter the commas,
  30. >a40:" 10  TOTAL SALES:     sum(b3:b8)        Perfect Calc supplies these.}
  31. >a42:"       However, before we begin entering these figures, let us modify
  32. >a43:" the blank spreadsheet so that it will accommodate this data.  
  33. >a45:" CHANGING THE COLUMN WIDTH
  34. >a46:"       First, let us change the column width of 'a' from its default
  35. >a47:" width of 9 characters to 15 characters.  With the cursor anywhere in
  36. >a48:" column 'a', type the CHANGE COLUMN WIDTH Command:     Control--x  w
  37. >a49:"   Perfect Calc responds with the message:   "Global or Column?"
  38. >a50:"   Since "global" applies to the entire spreadsheet, type a 'c' to indi-
  39. >a51:" cate the change only applies to the column which the cursor is current-
  40. >a52:" ly occupying.  Perfect Calc echoes this response with the message:
  41. >a53:"         "Column a:  "
  42. >a55:"    Type the new column width of '15' followed by a carriage return.
  43. >a56:" Perfect Calc immediately enlarges column 'a' to 15 characters.
  44. >a58:" In the same way change columns 'b' and 'd' to 12 characters, and 'c'
  45. >a59:" to 2 characters.  Following this you are ready to begin entering data.
  46. >a61:"       In position 'a1', 'b1', and 'd1' enter the labels "MONTH",
  47. >a62:" "SALES",  and "GRAPH" respectively.  Unless told otherwise, Perfect
  48. >a63:" Calc will place these labels against the left margin of their entry
  49. >a64:" boxes.  Since column headings look better 'centered', let us center
  50. >a65:" these headings in their respective columns. 
  51. >a66:" With the cursor anywhere in line 1 type the JUSTIFY ENTRY Command:
  52. >a67:"                Control--x  j
  53. >a68:"    Perfect Calc responds with the message:
  54. >a69:"            "Justify: Global, Line, or Column?"
  55. >a70:"     Enter 'l' for line.  Perfect Calc responds:  "Line 1:"
  56. >a71:"       Here you can respond in one of several ways.  Type a question
  57. >a72:" mark to see what your choices are:  "  ?  ".  The appropriate choice is
  58. >a73:" is 'c' for 'center'.  Perfect Calc centers all entries in line 1.
  59. >a74:"      As you can see Perfect Calc also lets you 'left justify' and 
  60. >a75:" 'right justify' entries (Left and Right).
  61. >a77:"       In line 2 enter as labels the three short rows of five hyphens
  62. >a78:" in columns 'a', 'b', and 'd'.  REMEMBER:  A hyphen is really a 'minus'
  63. >a79:" sign and will signal a number if not preceded by a double quote ( " ).
  64. >a81:"    The rows of hyphens (which will serve as underlines) should be as
  65. >a82:" long as the characters in the heading of the column.
  66. >a84:" Afterwards center these labels using the JUSTIFY ENTRY Command:
  67. >a85:"            Control--x  j
  68. >a87:"     Now, enter the first six months and their respective numeric values
  69. >a88:" into lines 3 to 8.  Indent each month 2 spaces from the left margin by
  70. >a89:" padding each label with two leading blanks.  Scroll these instructions 
  71. >a90:" backwards  and copy the data from the sample screen previously shown.
  72. >a91:" REMEMBER TO RETURN HERE AFTER ENTERING THE DATA!
  73. >a94:" Be sure to enter in position 'b9' the formula:
  74. >a96:"                FORMULA: b9=sum(b3:b8)
  75. >a98:"       As soon as you enter this formula Perfect Calc will perform a
  76. >a99:" recalculation and display a value for 'Total Sales'.  As you can see
  77. >a100:" Perfect Calc normally displays all numeric values showing two decimal
  78. >a101:" places.  However, this 'display format' can be changed.  
  79. >a103:"  Type the CHANGE DISPLAY FORMAT Command:
  80. >a104:"                   Control--x  d
  81. >a105:"    Perfect Calc responds:   "Display: Global, Line, or Column?"
  82. >a106:"    Select 'g' for 'global'.  Perfect Calc echoes:  "Global: " 
  83. >a107:"     As with similar commands, to see the options you now have, press
  84. >a108:" a question mark, ' ? '.  Perfect Calc responds with the choices:
  85. >a109:"         " 0 to 13, Sci, * , $ , Formula, or <CR> "
  86. >a110:"   These are the numeric display options available.  Typing a number 
  87. >a111:" between 0 and 13 produces a display that many decimal places for each 
  88. >a112:" number.  However, type a ' 0 '.  
  89. >a114:"      Perfect Calc displays the numbers as integers, showing no decimal
  90. >a115:" places.
  91. >a117:"    Type the CHANGE DISPLAY FORMAT again, this time selecting 's' for
  92. >a118:" 'Sci' (or scientific notation).  In this format all values are
  93. >a119:" displayed showing two places after the exponent 'E'.  
  94. >a120:" This display notation is commonly used for displaying very large or
  95. >a121:" very small numbers.  Perfect Calc will use it automatically for any
  96. >a122:" number which is too large or too small to fit into the entry box.
  97. >a123:"       Type the command again, selecting 'f' for 'formula display'.
  98. >a124:" This option causes all formulas in the line, column, or spreadsheet
  99. >a125:" to display at their entry position.  The formula computing 'Total
  100. >a126:" Sales' should be displaying at location 'b9'.
  101. >a128:"       Type the command again, selecting ' $ ' for 'dollars and cents'.
  102. >a129:" (If you work with financial figures this is a display format which you
  103. >a130:" may want to use frequently.)  Answering 'no' to "Display cents?"
  104. >a131:" causes Perfect Calc to round all figures to the nearest dollar.  Notice
  105. >a132:" that commas are inserted for extra readability.
  106. >a135:"      Finally, typing a carriage return in response to the display
  107. >a136:" format request, causes the default value of two decimal places to
  108. >a137:" be restored.
  109. >a139:"       Selecting a star ( * ) causes numeric values to display in 
  110. >a140:" graphic notation.  This option is useful for constructing bar graphs,
  111. >a141:" which is what we are going to do now.
  112. >a143:"  CONSTRUCTING A BAR GRAPH
  113. >a145:"       Suppose that we wish to represent each of our monthly sales
  114. >a146:" figures graphically in order to get a better idea of their relation-
  115. >a147:" ship to each other.  Position the cursor in column 'd',  which we 
  116. >a148:" have purposely enlarged to accommodate a bar graph.
  117. >a150:"       In a bar graph, numeric values are displayed using stars or
  118. >a151:" asterisks  '  *  '  .  A number will be represented by as many stars
  119. >a152:" as its value warrants.  Stars will be inserted in the entry position
  120. >a154:" starting at the lefthand edge of the column.  If the numeric value
  121. >a155:" is zero or less, nothing will be displayed.  If the value is greater
  122. >a156:" than the column width, the entire column will be filled with stars.
  123. >a158:"       The numeric values in column 'b' are so large that even the
  124. >a159:" smallest one will completely fill its entry position.  The figures
  125. >a160:" need to be proportionally 'scaled' so that they will fit in the
  126. >a161:" column while still maintaining a correct relation to each other.
  127. >a163:"       To generate a 'normalized' bar graph in column 'd', move the
  128. >a164:" cursor to position 'd3' and type the CHANGE DISPLAY FORMAT Command
  129. >a165:" (Control--x  d ), followed by 'c' for column, and ' * " for graphic
  130. >a166:" notation format.  Column 'd' is now ready to display numeric values
  131. >a167:" in graphic notation.
  132. >a168:"       Next, 'scale' the numeric data that will go into column 'd'
  133. >a169:" using a formula of the form:
  134. >a170:"         "dx = <width of column 'd'> * bx / max(bx:bn) "
  135. >a171:" where 'x' and 'n' are the line numbers of the first and last entries
  136. >a172:" in column 'b' respectively.
  137. >a174:"       This formula will produce a scaled numeric constant to represent
  138. >a175:" each sales figure in column 'b'.  Replicated to each entry box in 
  139. >a176:" column 'd' it will produce a series of such constants each proportional
  140. >a177:" to the largest sales value of column 'b'.  As such they will display
  141. >a178:" accurately as stars in column 'd'.
  142. >a180:"       For position 'd3' this formula becomes:
  143. >a182:"                    d3 = 12 * b3 / max(b3:b8)
  144. >a183:"    Copy this formula using the COPY ENTRY Command:   Control--w
  145. >a184:"    Perfect Calc copies the formula into the Save Buffer.
  146. >a185:"    Set a mark at 'd3' using the SET MARK Command:  Escape...<space bar>
  147. >a186:" afterwards moving the cursor to position 'd8'.  Replicate the formula
  148. >a187:" to every position in column 'd' by hitting the YANKBACK Command:
  149. >a188:"               Escape...y
  150. >a189:"      Perfect Calc asks you to identify the 'relative' variables in the
  151. >a190:" formula.  The first variable 'b3' is 'relative' {answer 'y'}.  The
  152. >a191:" second two variables contained within the 'max' function are 'absolute'
  153. >a192:" {thus answer 'n'}.
  154. >a194:" Perfect Calc enters the formula into positions 'd3' to 'd8', thereby
  155. >a195:" constructing the bar graph.
  156. >a197:"       Enlarging the width of column 'd' will necessarily increase the
  157. >a198:" resolution of the bar graph.  Do that now.  Change the column width
  158. >a199:" of 'd' from 12 characters to 25 characters, using the CHANGE COLUMN
  159. >a200:" WIDTH Command,  Control--x   w  .   Besides changing the actual 
  160. >a201:" width of the column, you must also edit and re-replicate the formula.
  161. >a204:"       This concludes Lesson 6.  The next lesson introduces the power of
  162. >a205:" 'associated files'.
  163. >a208:"     If you want to proceed to the next lesson use the CLEAR ENTIRE
  164. >a209:" MEMORY Command and then call up 'b:lesson7.pc' with the FIND FILE
  165. >a210:" command.
  166. >a214:"       If you do not wish to continue, type the QUIT Command:
  167. >a216:"                     Control--x  Control--c
  168. >a218:"       Answer 'yes' to Perfect Calc's message "Ignore changes this
  169. >a219:" session?"
  170. >a220:"                            END OF LESSON 6
  171. >a1
  172.