home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / forum7.lzh / C / VC / vc.1 < prev    next >
Text File  |  1988-09-06  |  7KB  |  241 lines

  1. .TH VC 1
  2. .SH NAME
  3. vc \- spreadsheet calculator ("visicalc-like")
  4. .SH SYNOPSIS
  5. .B vc
  6. [
  7. .I file
  8. ]
  9.  
  10. .SH DESCRIPTION
  11. .I Vc
  12. is a calculator that is based on rectangular tables, in much the same style
  13. as VisiCalc or T/Maker.  When it is invoked it presents you with an empty
  14. table organised as rows and columns of entries.  Each entry may have a label
  15. string associated with it and an expression.  The expression may be a
  16. constant or it may compute something based on other entries.
  17.  
  18. When \fIvc\fR is running, the screen is divided into three regions: the top
  19. line is for entering commands, the second line is for messages from
  20. \fIvc\fR, and the rest form a window looking at the table.  \fIvc\fR has two
  21. cursors: an entry cursor (indicated by a '<' on the screen) an a character
  22. cursor (indicated by the terminals hardware cursor).  The entry and
  23. character cursors are often the same, they will differ when a long command
  24. is being typed in the top line.
  25.  
  26. The following single control character commands are recognized no matter
  27. where the character cursor is.
  28.  
  29. .IP ^N
  30. Move the entry cursor to the next row.
  31.  
  32. .IP ^P
  33. Move the entry cursor to the previous row.
  34.  
  35. .IP ^F
  36. Move the entry cursor forward one column.
  37.  
  38. .IP ^B
  39. Move the entry cursor backward one column.
  40.  
  41. .IP ^C
  42. Exit from \fIvc\fR.  If you were editing a named file, and you modified
  43. it, then it will ask about saving before exiting.
  44.  
  45. .IP ^G
  46. Abort the current long command.
  47.  
  48. .IP ^H
  49. Backspace one character.
  50.  
  51. .IP ^K
  52. Forward one character
  53.  
  54. .IP ^D
  55. Delete one character
  56.  
  57. .IP ^I
  58. Toggle insert (overwrite) mode.
  59. The character in the upper left corner shows the mode ("-" for insert).
  60.  
  61. .IP ^L
  62. Propogate values around the screen.  A complicated set of rows
  63. and columns may require more than one ^L to stabilize.
  64.  
  65. .IP ^R
  66. Redraw the screen.
  67.  
  68. .IP ^J
  69. Creates a new row immediatly following the current row.  It is initialized
  70. to be a copy of the current row, with all variable references moved down one
  71. row.  If an expression is to be duplicated with ^J the moving down of a
  72. variable reference may be avoided by using the "fixed" operator.
  73.  
  74. .IP ^V
  75. Types, in the long command line, the name of the entry being pointed at by
  76. the entry cursor.  This is used when typing in expressions to refer to
  77. entries in the table.
  78.  
  79. .IP ^U\fIn\fR
  80. Sets the numeric argument to the following command to \fIn\fR.  Commands
  81. like ^F and ^B use the numeric argument as the number of times to perform
  82. the operation.  If you aren't entering a long command then the ^U is
  83. unnecessary: repetition count arguments may be entered just as a string of
  84. digits.
  85.  
  86. .PP
  87. The following commands are only valid when the character and entry cursors
  88. are the same.  That is, when no long command is being entered.  Most of them
  89. introduce a new long command.
  90.  
  91. .IP =
  92. Prompts for an expression which will be evaluated dynamically to produce a
  93. value for the entry pointed at by the entry cursor.  This may be used in
  94. conjunction with ^V to make one entries value be dependent on anothers.
  95.  
  96. .IP C
  97. Clears the current entry as if there were none.
  98.  
  99. .IP ?
  100. Types a brief helpful message.
  101.  
  102. .IP """
  103. Enter a label for the current entry.
  104.  
  105. .IP e
  106. Edit the value associated with the current entry.  This is identical to '='
  107. except that the command line starts out containing the old value or
  108. expression associated with the entry.
  109.  
  110. .IP E
  111. Edit the string associated with the current entry.  This is the same as
  112. either "leftstring", "rightstring", or "label", with the additional
  113. fact that the command line starts out with the old string.
  114.  
  115. .IP <
  116. Associate a string with this entry that will be flushed left against the
  117. left edge of the entry.
  118.  
  119. .IP >
  120. Associates a string with this entry that will be flushed right against the
  121. right edge of the entry.
  122.  
  123. .IP g
  124. Get a new database from a named file.
  125.  
  126. .IP p
  127. Put the current database onto a named file.
  128.  
  129. .IP w
  130. Write a listing of the current database in a form that matches its
  131. appearance on the screen.  This differs from the "put" command in that
  132. "put"s files are intended to be reloaded with "get", while "write" produces
  133. a file for people to look at.
  134.  
  135. .IP T
  136. Write a listing of the current database to a file, but put ":"s between
  137. each field.  This  is useful for tables that will be further formatted
  138. by the
  139. .I tbl
  140. preprocessor of
  141. .I nroff.
  142.  
  143. .IP f
  144. Sets the output format to be used for printing the numbers in each entry in
  145. the current column.  Type in two numbers which will be the width in
  146. characters of a column and the number of digits which will follow the
  147. decimal point.
  148.  
  149. .IP r
  150. Create a new row by moving the row containing the entry cursor, and all
  151. following, down one.  The new row will be empty.
  152.  
  153. .IP c
  154. Create a new column by moving the column containing the entry cursor, and
  155. all following, right one.  The new column will be empty.
  156.  
  157. .IP d
  158. Delete this row.
  159.  
  160. .IP D
  161. Delete this column.
  162.  
  163.  
  164. .IP C
  165. Clear this entry.
  166.  
  167. .PP
  168. Expressions that are used with the '=' and 'e' commands have a fairly
  169. conventional syntax.  Terms may be variable names (from the ^V command),
  170. parenthesised expressions, negated terms, and constants.  The +/ term sums
  171. values in rectangular regions of the table (the notation +/ is reminiscent
  172. of apl's additive reduction.)  Terms may be combined using many binary
  173. operators.  Their precedences (from highest to lowest) are: *,/; +,-;
  174. <,=,>,<=,>=; &; |; ?.
  175.  
  176. .TP 15
  177. exec("progname",arg1,...,argn)
  178. Start a shell with "progname" and arg1 through argn as arguments.
  179. The args can be arbitrary vc expressions.  The output of progname is
  180. converted to a floating point number and the result is returned as the
  181. value of exec.
  182.  
  183. .TP 15
  184. e+e
  185. Addition.
  186.  
  187. .TP 15
  188. e-e
  189. Subtraction.
  190.  
  191. .TP 15
  192. e*e
  193. Multiplication.
  194.  
  195. .TP 15
  196. e/e
  197. Division.
  198.  
  199. .TP 15
  200. +/v:v
  201. Sum all valid (nonblank) entries in the region whose two corners are defined
  202. by the two variable (entry) names given.
  203.  
  204. .TP 15
  205. e?e:e
  206. Conditional: If the first expression is true then the value of the second is
  207. returned, otherwise the value of the third is.
  208.  
  209. .TP 15
  210. <,=,>,<=,>=
  211. Relationals: true iff the indicated relation holds.
  212.  
  213. .TP 15
  214. &,|
  215. Boolean connectives.
  216.  
  217. .TP 15
  218. abs, acos asin, atan, ceil, cos, exp, floor, hypot, ln, log, sin, sqrt, tan
  219. The functions of the C-Math-Library
  220.  
  221. .TP 15
  222. To make a variable not change automatically when a row is duplicated with
  223. ^J, put the word \*(lqfixed\*(rq in front of it.  I.e.
  224. r2c1*fixed r3c1 
  225.  
  226. .SH FILES
  227. expense.sc \- a sample expense report.
  228.  
  229. .SH SEE ALSO
  230. bc(1), dc(1), the VisiCalc or T/Maker manuals.
  231.  
  232. .SH BUGS
  233. There should be a */ operator.
  234.  
  235. Expression reevaluation is done in the same top-to-bottom, left-to-right
  236. manner as is done in other spreadsheet calculators.  This is silly.  A
  237. proper following of the dependency graph with (perhaps) recourse to
  238. relaxation should be implemented.
  239.  
  240. At most 100 rows and 40 columns.
  241.