home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Science / Science.zip / OS2SCALC.ZIP / SC.MAN < prev    next >
Text File  |  1988-11-09  |  12KB  |  397 lines

  1.  
  2.  
  3.  
  4.      SC(1)                       UNIX 3.0                        SC(1)
  5.  
  6.  
  7.  
  8.      NAME
  9.           sc - spread sheet calculator ("visicalc-like")
  10.  
  11.      SYNOPSIS
  12.           sc [ _f_i_l_e ]
  13.  
  14.  
  15.      DESCRIPTION
  16.           _V_c is a calculator that is based on rectangular tables, in
  17.           much the same style as Visicalc or Lotus 123.  When it is
  18.           invoked it presents you with an empty table organised as
  19.           rows and columns of cells.  Each cell may have a label
  20.           string associated with it and an expression.  The expression
  21.           may be a constant or it may compute something based on other
  22.           entries.
  23.  
  24.           When _v_c is running, the screen is divided into four regions:
  25.           the top line is for entering commands, the second line is
  26.           for messages from _v_c, the third line and the first four
  27.           columns show the row and column numbers, and the rest of the
  28.           screen forms a window looking at the table.  _v_c has two
  29.           cursors: a cell cursor (indicated by a '<' on the screen)
  30.           and a character cursor (indicated by the terminals hardware
  31.           cursor).  The cell and character cursors are often the same.
  32.           They will differ when a long command is being typed on the
  33.           top line.
  34.  
  35.           Commands which use the terminal's control key will work when
  36.           either a long command is being typed or in "normal" mode.
  37.  
  38.           The cursor control commands and the row, column commands can
  39.           be prefixed by a numeric argument indicating how many times
  40.           the command is to be executed.  "^U" can be used before the
  41.           number if the cursor movement is to take place while a
  42.           command is being typed into the command line.
  43.  
  44.           Cursor control commands:
  45.  
  46.  
  47.           ^N   Move the cell cursor to the next row.
  48.  
  49.  
  50.           ^P   Move the cell cursor to the previous row.
  51.  
  52.  
  53.           ^F   Move the cell cursor forward one column.
  54.  
  55.  
  56.           ^B   Move the cell cursor backward one column.
  57.  
  58.  
  59.           ^H   Backspace one character.
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 1/5/87)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      SC(1)                       UNIX 3.0                        SC(1)
  71.  
  72.  
  73.  
  74.           h, j, k, l
  75.                Alternate cursor controls (left, down, up, right).
  76.  
  77.  
  78.           0    Move the cell cursor to column 0 of the current row.
  79.  
  80.  
  81.           $    Move the cell cursor to the last valid column in the
  82.                current row.
  83.  
  84.  
  85.           Cell entry and editing commands:
  86.  
  87.  
  88.           =    Prompts for an expression which will be evaluated
  89.                dynamically to produce a value for the cell pointed at
  90.                by the cell cursor.  This may be used in conjunction
  91.                with ^V to make one entries value be dependent on
  92.                anothers.
  93.  
  94.  
  95.           "    Enter a label for the current cell.
  96.  
  97.  
  98.           <    Enter a label that will be flushed left against the
  99.                left edge of the cell.
  100.  
  101.  
  102.           >    Enter a label that will be flushed right against the
  103.                right edge of the cell.
  104.  
  105.  
  106.           x    Clears the current cell.
  107.  
  108.  
  109.           e    Edit the value associated with the current cell.  This
  110.                is identical to '=' except that the command line starts
  111.                out containing the old value or expression associated
  112.                with the cell.
  113.  
  114.  
  115.           E    Edit the string associated with the current cell.  This
  116.                is the same as either "leftstring", "rightstring", or
  117.                "label", with the additional fact that the command line
  118.                starts out with the old string.
  119.  
  120.  
  121.           m    Mark a cell to be used as the source for the copy
  122.                command.
  123.  
  124.  
  125.           c    Copy the last marked cell to the current cell, updating
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 1/5/87)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      SC(1)                       UNIX 3.0                        SC(1)
  137.  
  138.  
  139.  
  140.                the row and column references.
  141.  
  142.  
  143.           ^T   Toggle cell display.  The current cell's contents are
  144.                displayed in line one when no command being entered or
  145.                edited.  ^T turns the display on or off.
  146.  
  147.  
  148.           File operations
  149.  
  150.  
  151.           G    Get a new database from a file.
  152.  
  153.  
  154.           P    Put the current database into a file.
  155.  
  156.  
  157.           W    Write a listing of the current database in a form that
  158.                matches its appearance on the screen.  This differs
  159.                from the "put" command in that "put"s files are
  160.                intended to be reloaded with "get", while "write"
  161.                produces a file for people to look at.
  162.  
  163.  
  164.           T    Write a listing of the current database to a file, but
  165.                put ":"s between each field.  This  is useful for
  166.                tables that will be further formatted by the _t_b_l
  167.                preprocessor of _n_r_o_f_f.
  168.  
  169.  
  170.           M    Merges the database from the named file into the
  171.                current database.  Values, expressions and names
  172.                defined in the named file are written into the current
  173.                file, overwriting the existing entries at those
  174.                locations.
  175.  
  176.  
  177.           Row and Column operations.  Members of this class of
  178.           commands can be used on either rows or columns.  The second
  179.           letter of the command is either a column designator (one of
  180.           the characters c, j, k, ^N, ^p) or a row designator (one of
  181.           r, l, h, ^B, ^F).  Commands which move or copy cells also
  182.           modify the variable references in affected cell expressions.
  183.           Variable references may be frozen by using the "fixed"
  184.           operator.
  185.  
  186.  
  187.           ar, ac
  188.                Creates a new row (column) immediately following the
  189.                current row (column).  It is initialized to be a copy
  190.                of the current one.
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 1/5/87)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      SC(1)                       UNIX 3.0                        SC(1)
  203.  
  204.  
  205.  
  206.           dr, dc
  207.                Delete this row (column).
  208.  
  209.  
  210.           pr, pc, pm
  211.                Pull deleted rows (columns) back into the spread sheet.
  212.                The last deleted set of cells is put back into the
  213.                spread sheet at the current location.  _P_r inserts
  214.                enough rows to hold the data.  _P_c inserts enough
  215.                columns to hold the data.  _P_m (merge) does not insert
  216.                rows or columns, but overwrites the cells beginning at
  217.                the current cursor location.
  218.  
  219.  
  220.           ir, ic
  221.                Insert a new row (column) by moving the row (column)
  222.                containing the cell cursor, and all following, down
  223.                (right) one.  The new position will be empty.
  224.  
  225.  
  226.           zr, zc
  227.                Hide ("zap") the current row (column).  This keeps a
  228.                row or column from being displayed but keeps it in the
  229.                data base.
  230.  
  231.  
  232.           vr, vc
  233.                Removes expressions from the affected rows (columns),
  234.                leaving only the values which were in the cells before
  235.                the command was executed.
  236.  
  237.  
  238.           sr, sc
  239.                Show hidden rows (columns).  Type in a range of rows or
  240.                columns to be revealed.  The command default is the
  241.                first range of rows or columns currently hidden.
  242.  
  243.  
  244.           f    Sets the output format to be used for printing the
  245.                numbers in each cell in the current column.  Type in
  246.                two numbers which will be the width in characters of a
  247.                column and the number of digits which will follow the
  248.                decimal point.  Note that this command has only a
  249.                column version and does have a second letter.
  250.  
  251.  
  252.           Miscellaneous commands:
  253.  
  254.  
  255.           ^C   Exit from _v_c.  If you were editing a named file, and
  256.                you modified it, then it will ask about saving before
  257.                exiting.
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 1/5/87)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      SC(1)                       UNIX 3.0                        SC(1)
  269.  
  270.  
  271.  
  272.           q    Alternate exit command.
  273.  
  274.  
  275.           ?    Types a brief helpful message.
  276.  
  277.  
  278.           /    Copy a region to the area specified by the current
  279.                cell.
  280.  
  281.  
  282.           ^G or ESC
  283.                Abort the current long command.
  284.  
  285.  
  286.           ^R   Redraw the screen.
  287.  
  288.  
  289.           ^V   Types, in the long command line, the name of the cell
  290.                being pointed at by the cell cursor.  This is used when
  291.                typing in expressions to refer to entries in the table.
  292.  
  293.  
  294.           ^E   Types, in the long command line, the expression of the
  295.                cell being pointed at by the cell cursor.
  296.  
  297.  
  298.           ^A   Types, in the long command line, the value of the cell
  299.                being pointed at by the cell cursor.
  300.  
  301.  
  302.           Expressions that are used with the '=' and 'e' commands have
  303.           a fairly conventional syntax.  Terms may be variable names
  304.           (from the ^V command), parenthesised expressions, negated
  305.           terms, and constants. Rectangular regions of the screen may
  306.           be operated upon with '@' functions such as sum (@sum),
  307.           average (@avg) and product (@prod).  Terms may be combined
  308.           using many binary operators.  Their precedences (from
  309.           highest to lowest) are: *,/; +,-; <,=,>,<=,>=; &; |; ?.
  310.  
  311.  
  312.           e+e            Addition.
  313.  
  314.  
  315.           e-e            Subtraction.
  316.  
  317.  
  318.           e*e            Multiplication.
  319.  
  320.  
  321.           e/e            Division.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 1/5/87)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      SC(1)                       UNIX 3.0                        SC(1)
  335.  
  336.  
  337.  
  338.           @sum(v:v)      Sum all valid (nonblank) entries in the
  339.                          region whose two corners are defined by the
  340.                          two variable (cell) names given.
  341.  
  342.  
  343.           @avg(v:v)      Average all valid (nonblank) entries in the
  344.                          region whose two corners are defined by the
  345.                          two variable (cell) names given.
  346.  
  347.  
  348.           @prod(v:v)     Multiply together all valid (nonblank)
  349.                          entries in the region whose two corners are
  350.                          defined by the two variable (cell) names
  351.                          given.
  352.  
  353.  
  354.           e?e:e          Conditional: If the first expression is true
  355.                          then the value of the second is returned,
  356.                          otherwise the value of the third is.
  357.  
  358.  
  359.           <,=,>,<=,>=    Relationals: true iff the indicated relation
  360.                          holds.
  361.  
  362.  
  363.           &,|            Boolean connectives.
  364.  
  365.  
  366.           fixed          To make a variable not change automatically
  367.                          when a cell moves, put the word fixed in
  368.                          front of the reference.  I.e.  B1*fixed C3
  369.  
  370.  
  371.  
  372.      SEE ALSO
  373.           bc(1), dc(1)
  374.  
  375.  
  376.      BUGS
  377.           Expression reevaluation is done in the same top-to-bottom,
  378.           left-to-right manner as is done in other spread sheet
  379.           calculators.  This is silly.  A proper following of the
  380.           dependency graph with (perhaps) recourse to relaxation
  381.           should be implemented.
  382.  
  383.           At most 200 rows and 40 columns.
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                                           (printed 1/5/87)
  394.  
  395.  
  396.  
  397.