DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦3389dd92e⟧ TextFile

    Length: 11520 (0x2d00)
    Types: TextFile
    Names: »LESSON6.PC«

Derivation

└─⟦a6ed1cd35⟧ Bits:30002862 Perfect Calc 1.10 for JET80 CP/M
    └─ ⟦this⟧ »LESSON6.PC« 

TextFile

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