sc - spreadsheet calculator [ ]

is a calculator that is based on rectangular tables, in much  the
same  style  as  VisiCalc  or  T/Maker.   When  it  is invoked it
presents you with an empty table organised as rows and columns of
entries.   Each  entry may have a label string associated with it
and an expression.  The expression may be a constant  or  it  may
compute something based on other entries.

When _s_c is running, the screen is divided into three regions: the
top  line  is  for entering commands, the second line is for mes-
sages from _s_c, and the rest form a window looking at  the  table.
_s_c  has  two  cursors: an entry cursor (indicated by a '<' on the
screen)  an  a  character  cursor  (indicated  by  the  terminals
hardware  cursor).  The entry and character cursors are often the
same, they will differ when a long command is being typed in  the
top line.

The following single control character commands are recognized no
matter where the character cursor is.

Move the entry cursor to the next row.

Move the entry cursor to the previous row.

Move the entry cursor forward one column.

Move the entry cursor backward one column.

Exit from _s_c.

Abort the current long command.

Backspace one character.

Redraw the screen.

Creates a new row immediatly following the current  row.   It  is
initialized  to  be  a copy of the current row, with all variable
references moved down one row.  If an expression is to be  dupli-
cated  with  ^J  the  moving  down of a variable reference may be
avoided by using the "fixed" operator.

Types, in the long command line, the  name  of  the  entry  being
pointed  at by the entry cursor.  This is used when typing in ex-
pressions to refer to entries in the table.

Sets the numeric argument to the following command  to  _n.   Com-
mands  like  ^F  and ^B use the numeric argument as the number of
times to perform the operation.  If you aren't  entering  a  long
command  then  the  ^U is unnecessary: repetition count arguments
may be entered just as a string of digits.

The following commands are only valid when the character and  en-
try cursors are the same.  That is, when no long command is being
entered.  Most of them introduce a new long command.

Prompts for an expression which will be evaluated dynamically  to
produce  a  value  for  the entry pointed at by the entry cursor.
This may be used in conjunction with ^V to make one entries value
be dependent on anothers.

Types a brief helpful message.

Enter a label for the current entry.

Edit the value associated with the current entry.  This is ident-
ical  to  '='  except that the command line starts out containing
the old value or expression associated with the entry.

Associate a string with this entry  that  will  be  flushed  left
against the left edge of the entry.

Associates a string with this entry that will  be  flushed  right
against the right edge of the entry.

Get a new database from a named file.

Put the current database onto a named file.

Write a listing of the current database in a  form  that  matches
its  appearance  on the screen.  This differs from the "put" com-
mand in that "put"s files are intended to be reloaded with "get",
while "write" produces a file for people to look at.

Sets the output format to be used for  printing  the  numbers  in
each entry in the current column.  Type in two numbers which will
be the width in characters of a column and the number  of  digits
which will follow the decimal point.

Create a new row by moving the row containing the  entry  cursor,
and all following, down one.  The new row will be empty.

Create a new column by moving the  column  containing  the  entry
cursor,  and  all  following,  right one.  The new column will be
empty.

Delete this row.

Delete this column.



Expressions that are used with the '=' and 'e'  commands  have  a
fairly  conventional  syntax.   Terms may be variable names (from
the ^V command), parenthesised expressions,  negated  terms,  and
constants.  The +/ term sums values in rectangular regions of the
table (the notation +/ is reminiscent of  apl's  additive  reduc-
tion.)  Terms may be combined using many binary operators.  Their
precedences (from highest to lowest) are: *,/; +,-;  <,=,>,<=,>=;
&; |; ?.

e+e Addition.

e-e Subtraction.

e*e Multtplication.

e/e Division.

+/v:v Sum all valid (nonblank) entries in the  region  whose  two
corners are defined by the two variable (entry) names given.

e?e:e Conditional: If the first expression is true then the value
of the second is returned, otherwise the value of the third is.

<,=,>,<=,>= Relationals: true iff the indicated relation holds.

&,| Boolean connectives.

expense.sc - a sample expense report.

bc(1), dc(1), the VisiCalc or T/Maker manuals.

There should be a */ operator.

Expression reevaluation is done in the same top-to-bottom,  left-
to-right  manner  as  is  done  in other spreadsheet calculators.
This is silly.  A proper following of the dependency  graph  with
(perhaps) recourse to relaxation should be implemented.


























































