home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / spreadsheets / a180_1 / !SSS / !Help < prev    next >
Text File  |  1991-07-30  |  15KB  |  310 lines

  1. SSS - A desktop Spreadsheet
  2.  
  3. VERSION 0.1
  4.  
  5. INTRODUCTION
  6.    SSS is a simple spreadsheet for the Archimedes.
  7.    It can manipulate a grid of cells containing strings or formulae.
  8.    It can load or save these grids in its own format or as text.
  9.    It can produce draw file graphics from the grids.
  10.    The name SSS was originally intended to stand for statistical
  11. spread sheet, however the statistical functions have not yet been
  12. implemented. The name could stand for simple spreadsheet or slow spreadsheet!
  13.    SSS is started from the RISC-OS desktop in the usual way by double 
  14. clicking on its icon. It installs on the iconbar, a blank sheet can be opened
  15. by clicking on this icon.
  16.    SSS needs to have seen the !System directory, and to find version 3.5 or
  17. later of the shared C library, and the floating point emulator in
  18. !System.modules .
  19.    SSS is controlled by two menus, one one the iconbar and one on the 
  20. spreadsheet window, and by a edit window and some  key presses.
  21.    The key presses only operate when the caret is in the edit window.
  22.  
  23.    Menu options are denoted as follows in this file:-
  24.  
  25.    <Window->Graph->Bars> means the bars option from the save option
  26. of the window menu.
  27.  
  28.  
  29. CELLS and BOXES
  30.  
  31.    The rows and columns of the sheet are numbered starting from 0 at the
  32. top left. A cell is denoted [x,y] where x is the column number and y the
  33. row number. So [0,0] is the top left cell.
  34.    A rectangular range of cells (box) is denoted by its top left and bottom
  35. right cells. The initial sheet has 20 rows and columns, so a box containing
  36. the whole sheet is denoted [0,0][19,19].
  37.  
  38.    Regions of the spreadsheet are denoted by two boxes.
  39.  
  40.    The source box is displayed as an unfilled box surrounded by a thick
  41. border.
  42.    The target box is displayed as a filled box.
  43.  
  44.    In general the target box is used to denote a region to be changed
  45. by an operation, and the source box gives values to be read.
  46.  
  47.    The source box can be altered by clicking select on the sheet. It can
  48. be resized by clicking alter.
  49.    The source box can be set to the full width of the sheet by presssing F8,
  50. and to the full height by F9.
  51.    The home key sets the source box to [0,0] and <shift> home sets it to the
  52. bottom right cell of the sheet. These both may scroll the sheet.
  53.    The target box is set equal to the source box by selecting <Window->Edit>
  54. or clicking on the Edit icon in the edit window or pressing F2.
  55.  
  56.    A single cell box will be refered to as a cell, and a box of width or
  57. height one as a row or column.
  58.  
  59. EDITING A SHEET
  60.   When a spreadsheet is opened a second window, the edit window is also
  61. opened. If closed it can be reopened by selecting <Window->Edit>.
  62.   When the edit window is opened the target box is made equal to the source
  63. box. The coordinates of this box are set in the edit window title bar and
  64. the top left entry of the box is read into the edit window.
  65.   The entry in the edit window can be edited in the usual manner. Clicking
  66. on the OK icon or pressing F1 or <return> enters it into all the cells
  67. of the target box.
  68.   After clicking OK the target box moves on one cell. The direction of
  69. movement is determined by the arrow icons in the edit window. The box does
  70. not move if it is more than one cell wide in the direction of motion.
  71.   The next icon (or F4) moves the box without altering the cells.
  72.   The cancel box (or F5) restores the original entry to the edit window
  73. ( before OK is selected!).
  74.  
  75.   The entries in the cells can be either strings, that are displayed verbatim,
  76. or formulae (including numbers) that are evaluated before displaying.
  77. These are selected by clicking on one of the top row of icons in the edit
  78. window before clicking OK. 
  79.   Strings can be displayed in two formats 
  80.          String - truncated to the column width -
  81.       or Long   - not truncated        *** not yet implemented **
  82.   Formulae can be displayed in four formats
  83.          Int -whole numbers 2dp 4dp or Exp - exponential format.
  84.   A blank cell is initially given the format of the cell above, or INT
  85. if this is blank or does not exist.
  86.   To change the display format of all the formulae in the target box without
  87. changing the values -select the required format and click on Format.
  88.  
  89. FORMULAE
  90.          Formulae can be constructed using the following terms
  91.  
  92.    arithmetical operations  + - * /
  93.           powers            ^         e.g.    3^2 = 9
  94.           brackets          ( )
  95.           numbers                    e.g    1, 57, 0.371
  96.           special numbers    pi,e
  97.                              x - column number
  98.                              y - row number
  99.           cells              [,]     e.g.  [3,5] , [x-7,x+2*y]
  100.           functions          sin,cos,tan,exp,log,sqrt,sq,abs
  101.                              ceil,floor,round  e.g floor(3.6)=3
  102.                              asin,acos,atan
  103.                              atan2 atan2(x,y)= angle between (x,y),(0,0),(1,0)
  104.                              sinh,cosh,tanh
  105.           range functions    sum,count,mean,ssd,psd,max,min
  106.                              e.g. ssd[0,0][3,5] = the sample standard
  107.                              deviation of any formulae in the 24 cells in
  108.                              the range.
  109.                              psd = population standard deviation.
  110.  
  111. The expressions in a range or  in cell parameter are restricted to 
  112. combinations of +-*/ () x,y and whole numbers. e.g. [x+3.5,y] or [x,[x,1]]
  113. are not allowed.
  114.  
  115. A formula that is incorrectly formed, such as 3*(x+1   (missing bracket)
  116. is displayed as a parse error  ?P???????? .
  117. A formula that cannot be evaluated such as sqrt(-1) or [0,0] if cell [0,0]
  118. contains a string or error is displayed as an arithmetical error ?A???????
  119.  
  120. When entering formulae the source box can be entered by clicking on the
  121. Relative or Absolute icons. If the source box is a cell that cell is entered.
  122. Otherwise a range is entered. The Absolute icon just gives the coordinates
  123. as numbers. The Relative gives them relative to the top left hand cell of
  124. the target box.
  125.   E.g. if the source box is [0,0] and the edit box is the column [1,0][1,5]
  126. Absolute will set each entry of the column to [0,0] giving the same value
  127. to each. Relative will set each entry to [x-1,y] giving each entry in the
  128. edit box the same value as the cell to its left.
  129.  
  130. COLUMN WIDTHS
  131.   These are set using the <Window->Width> options which sets the display
  132. widths of the whole of all the columns in the source box. Display items
  133. will be truncated to fit these columns.
  134.   The Fit option is not yet implemented.
  135.   Column widths of zero can be used to indicate that certain operations do
  136. not apply to some columns in a box. In particular they are not affected
  137. by edit operations.
  138.   The home and <shift> home keys or the  Next icon may be needed to select
  139. a column of width zero to increase its width.
  140.  
  141.  
  142. LOADING AND SAVING
  143.  
  144. The <Window->Save> menu leads to three options.
  145.  
  146.     <Window->Save->Sheet> saves the whole sheet in a form suitable for
  147. reloading into SSS. Sheets are saved as file type 0x0E3 SSSheet.
  148. The file includes the column widths and the size of the sheet.
  149.  
  150.     <Window->Save->Part> saves the source box as a SSSheet file.
  151. Columns of width zero are not saved.
  152.  
  153.     <Window->Save->Text> saves the source box as a text file.
  154. The format of this file is determined by items in the <Iconbar->PrSetup>
  155. menu. The column width determines if the sheet is split to fit on a page.
  156. The separator is up to 3 symbols (including spaces) that can be printed
  157. between columns. If the repeat first option is selected and the sheet is
  158. split to fit on the page then the first column will be repeated at the
  159. start of each part.
  160. Columns of width zero are not saved.
  161. This file can be printed by dragging to a printer, or by pressing the Print
  162. key.
  163.  
  164. Sheets can be loaded by double clicking on a SSSheet file, or by draging a
  165. SSSheet or Text file to the iconbar icon or the sheet window.
  166. SSS can only deal with 1 file at a time, loading a new sheet by double
  167. clicking or dragging to the iconbar will lose any sheet loaded at the time!!!
  168. Draging to the sheet window merges the new sheet with the current one.
  169. The new sheet is merged with its top left corner at the top left corner of
  170. the target box. If it is too big to fit in the current sheet it is truncated.
  171. Text files cannot be merged. Column widths are increased if necessary.
  172. When loading text files entries are split at spaces, commas or tabs. A new
  173. column is started for a newline. A guess is made as to the correct format
  174. for the entry.
  175.  
  176. UPDATING
  177.          Entries that depend on other cells can be updated by selecting
  178. <Window->Update> . If <Window->Auto> is selected updating takes place after
  179. any editing operation repeatedly until no changes are made.
  180.  
  181. RESIZING THE SHEET
  182. <Window->Resize> contains five options
  183.              New Col - Insert a new column to the left of the target box.
  184.              New Row - Insert a new row above the target box.
  185.              Delete Cols - Delete the columns in the target box.
  186.              Delete Rows - Delete the rows in the target box.
  187.              Extend - Add rows and/or cols at the right and bottom.
  188. A maximum of fifty columns are allowed. The maximum number or rows is only
  189. determined by the avaliable memory.
  190.  
  191. MOVING THE ENTRIES
  192. <Window->Copy> copies entries from the source box to the target box.
  193. If the target box is a cell the source box is copied preserving its shape
  194. with the target box as top left corner, otherwise the source box is copied
  195. into the target box one entry at a time going across rows and then down to
  196. the next row. This allows copying from a row to a column or vv.
  197. Sorting of entries can be done either on a column or a row. The indexing
  198. entries are given by the source box, which must be either a row or a column.
  199. The entries to be moved are given by the target box. This would normally
  200. include the source box but may not. If the source box is a row it must have 
  201. the same horizontal extent as the target box. If it is a column it must have
  202. the same vertical extent. The source box must be either all strings, when
  203. the sorting is into ascii order, or all numerical when the sorting is into
  204. increasing order.
  205.  
  206. GRAPHICAL OUTPUT
  207. Grapical output is in the form of Draw files. The pagesize should be set from
  208. the <Iconbar->PrSetup> menu. The options are
  209.              A4p - A4 portrait
  210.              A4l - A4 landscape
  211.              A5l - A5 landscape
  212.              Read- Read pagesize from a printer driver.
  213. <Iconbar->PrSetup> also includes an option for monochrome output.
  214. The graphics options all take data as columns. y values come from the target
  215. box and x values from the source box.Columns of width zero are omitted.
  216. The graphics options all use the Trinity.Medium font, which shold be
  217. avaliable. The point size is chosen using the width of the first column of
  218. the Edit box to fit the avaliable space. Reducing this width will increase
  219. the point size.
  220.  
  221. <Window->Graph->Bars> produces a bar chart. The data is taken from columns of
  222. the target box. Columns of width zero are not displayed.
  223. If the source box is a column of the same vertical extent as the target box
  224. it is used as labels for the x-axis.
  225.  
  226. <Window->Graph->Line> produces a line graph. The source box must be a column
  227. of the same vertical extent as the target box, and must consist of valid
  228. numerical data. The source box data should be ordered.
  229.  
  230. HINTS AND EXAMPLES
  231.        To clear a sheet press F8 and F9 to select the whole sheet,
  232. press F2 to edit, <shift> Copy to clear the line and F1 for OK.
  233. Clearing a cell releases memory used by the cell, and forgets the format.
  234.        
  235.        Clearing a large sheet is very slow. If a big sheet is loaded and
  236. you want to load a new one it will be much quicker to quit and start again.
  237.  
  238.        Care should be taken using absolute cell references. If part of the
  239. sheet is saved, or cells added or removed the numbering will change.
  240.  
  241.        If cell and row numbers are required in the margins press home and F8
  242. to select the first row, press F2 to Edit and put x in the first row.
  243. Then use home and F9 and put y in the first column.
  244.  
  245.        An example of a graph of two functions.
  246. First double click on the !Fonts directory to ensure Trinity.Medium is
  247. avaliable.
  248.        Start with a blank sheet. Put y in the first column as above.
  249. Put sin(y/3) in the second column and 2+cos(y/3) in the third.Set the
  250. formats of these columns to 2dp so the results are visible.Select the
  251. second two columns e.g. click select on [1,0],alter on [2,0] press F9.
  252. Click Edit.Set the width of these columns to 4 to set the font size used.
  253. Select the first column e.g. Home F9. Drag a Draw file from
  254. <Window->Graph->Line> to a suitable directory.
  255. Double click on this saved file to see the result. You can also drag these
  256. files directly into Draw.
  257.        The example sheet Class provided gives the continuous assesment and
  258. exam marks for a class of students. The overall mark is calculated using
  259. a weighting of 40:60 CA:Exam.
  260.        The right end of the sheet does a regression calculation to calculate
  261. a straight line estimate for the Exam percentage as a function of the CA
  262. percentage. The estimated exam marks are given for each student.
  263. Note:-The CA total is given by sum[1,y][x-2,y] the range references are mixed
  264. absolute and relative. This means it is possible to add a new CA column
  265. without having to alter the formulae. The same holds for the other column
  266. formulae. Similarly you can add a new row for another student. Unfortunately
  267. The formulae in the prediction column depend on the calculated slope and
  268. intercept. The y position of these cannot be specified in a way that allows
  269. adding a new student, and so the formulae must be altered by hand.
  270.    Exercises i) Set Auto updating and alter the CA3 mark for B.Smith to 15.
  271.             ii) Add a new CA column. Insert a column. Copy a CA column into
  272. it and adjust the marks.
  273.            iii) Add a new student. Correct the formulae in the Prediction
  274. column.
  275.             iv) Sort the students according to overall mark.(Only move the
  276.                 names and marks,not formulae!)
  277.              v) Get a scatter diagram of exam % and predicted marks against
  278.                 CA%.(Dont plot the overall mark!)
  279.             vi) Plot a line graph as in v) (Sort suitably).
  280.  
  281.  
  282.  
  283. TO DO
  284.        There are a vast number of improvements or additions that could
  285. be considered. They will probably have to wait until either I decide
  286. that I can't do without them or there is a concerted clamour from other
  287. users. Some possibilities include
  288.  
  289.        Implement the LONG string option
  290.        Implement the FIT width option
  291.        Checks to prevent accidental overwriting or deleting of the sheet
  292.        Checks on validity of input files
  293.        Checks on the validity of draw file output (too many missing values
  294.        could produce invalid output files)
  295.        Statistical functions (Regression, Chisquared ,Anova?)
  296.        Random numbers from statistical distributions
  297.        Speed up clearing
  298.        Speed up updating
  299.        Speed up redraw
  300.  
  301. COMMENTS PLEASE
  302.  
  303.   I would welcome bug reports, criticism (constructive or otherwise),
  304. modifications or suggestions for modifications. Further versions are
  305. not likely to appear unless I obtain sufficient feedback from users.
  306.  
  307.                   Chris Stretch
  308.                                  Archive and Arcade BBS No.62
  309.                          CBTP13@CBS%UK.AC.ULSTER.UCVAX
  310.