home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 224 / 224.d81 / t.manual3 < prev    next >
Text File  |  2022-08-26  |  8KB  |  269 lines

  1. u
  2.            D A T A T O O L
  3.  
  4.  
  5. SEARCH FOR TEXT
  6.  
  7.  The search will be done in the
  8. worksheet including all data, text
  9. and settings, but not in any other
  10. item of the main menu. For example:
  11. you will be able to search for a BASIC
  12. text sequence stored somewhere in the
  13. worksheet, but not for a text sequence
  14. stored in the loading section, or
  15. somewhere else.
  16.  
  17.  The instruction for searching text is
  18. limited to 80 characters. Pass over
  19. will be ignored without error message.
  20. There is no particular search for
  21. numbers and ranges, but you can search
  22. for a number or a part of a number as
  23. well. Don't search for a certain
  24. layout, because the search looks at
  25. numbers the way they are shown in
  26. input-mode, without care about layout
  27. setting.
  28.  
  29.  No wildcard characters are available.
  30. You can only search for the (part)
  31. text you specify. Letter case is
  32. significant!
  33.  
  34.  When Search is on, you will move from
  35. one found subject to another using
  36. <CRSR left/right>. If you have chosen
  37. the Replace option, movement is the
  38. same, but in this case you may press
  39. <RETURN> in order to replace the text
  40. found by the text you set as
  41. replacement and to move on forward.
  42. If the replacement text is empty, the
  43. text found will be deleted.
  44.  
  45.  You always have the option to exit
  46. the search and to stay in the present
  47. cell by pressing the <BACK-ARROW> key.
  48.  
  49.  
  50. SORT DATA
  51.  
  52.  First, you have to choose between
  53. sorting from lower to higher value
  54. (ascend) or from higher to lower value
  55. (descend). Secondly, you choose the
  56. column that will be decisive, whether
  57. Number or Text type. Then you may
  58. start.
  59.  
  60.  The system will sort data-rows. If
  61. there are any other rows (e.g. BASIC,
  62. Res, Label, Pause) in between, the
  63. sorting process will not disturb this
  64. arrangement, but the data-rows will be
  65. sorted blockwise. Empty rows are
  66. sorted last, no matter which sort
  67. order is set. But if a row contains
  68. something, an empty decisive column
  69. will be counted as the very lowest
  70. value.
  71.  
  72.  If you want to sort more then one
  73. level (represented by several
  74. columns), you have to sort the lowest
  75. level first. The sorting routine will
  76. keep the rank as far as the decisive
  77. column holds an equivalent value.
  78.  
  79.  Be warned, that sorting a very large
  80. worksheet will take a good while. You
  81. can interrupt the process using the
  82. <STOP> key, without endangering the
  83. data.
  84.  
  85.  
  86. LOAD FILES
  87.  
  88.  An important restriction has to be
  89. told first: Datatool is unable to
  90. access tape, because memory locations
  91. for tape access are occupied by the
  92. system itself.
  93.  
  94.  There are two different ways of
  95. inputting data from disk. The first
  96. one is to Load a native "DT" file,
  97. which was stored as a Datatool file
  98. before. You just have to key in the
  99. filename. In case the filename
  100. consists of spaces at the start or at
  101. the end, the length of the filename
  102. can be fixed with quotation marks,
  103. otherwise overhanging spaces will be
  104. cut. (If you don't remember the
  105. filename exactly, press f8, view the
  106. directory and copy the filename using
  107. the buffers.) Then press <RETURN> at
  108. the Okay cell to load a worksheet,
  109. including all settings in all menu
  110. items. The system will check if the
  111. file is valid, and inform you if it
  112. isn't.
  113.  
  114.  You can also Import data from any
  115. source on disk. This option simply
  116. consists of three BASIC code
  117. sequences. They will be executed in
  118. order to open a file, to input row
  119. data, and to close the file. Similar
  120. to running the worksheet, the opening
  121. code is executed once, the import row
  122. code is executed in any data row or
  123. result row from 1 to 999, unless the
  124. I/O status changes because the end of
  125. the file is reached or an error
  126. occurs. Finally the code for closing
  127. the file is executed.
  128.  
  129.  Example: You want to import the
  130. directory of your game disks, in order
  131. to print the content nicely, to sort
  132. files by name, to build up a database,
  133. or anything of that kind.
  134.  
  135.  First, you prepare the worksheet. You
  136. designate a sequence number for disk
  137. and file in column A, assigned to
  138. variable n, numeric type, 6 characters
  139. width, 2 fixed decimal places. It will
  140. hold the disk number in the integer
  141. part, and the file number in the
  142. decimal places. Variable na$, which
  143. stores disk and filename, will be in
  144. column B. Variable bl containing the
  145. number of blocks goes in column C. And
  146. finally variable ty$ will show the
  147. file type in Column D.
  148.  
  149.  After the design of the worksheet is
  150. settled, you turn towards the code for
  151. inputting data from disk. This is
  152. written in the Import section of the
  153. Load menu.
  154.  
  155.  In the sequence for opening a file,
  156. you open a channel for reading the
  157. directory "$" from disk, and fetch the
  158. first two bytes of the loading address
  159. without using it.
  160.  
  161.  The main task for importing row data
  162. uses GOTO statements. Therefore you
  163. have to number the lines. The lines
  164. numbered from 2 to 8 concern the way
  165. already existing data in the worksheet
  166. are treated. If you want to collect
  167. more then one directory in the
  168. worksheet, you have to consider that
  169. the code for importing rows is called
  170. from row number 1 to the end of file.
  171. BASIC line 2 observes the present load
  172. of the worksheet and counts the
  173. highest stored disk or file number in
  174. variable h. If a row is empty,
  175. variable n will contain zero, and the
  176. process of inputting the directory can
  177. start. Otherwise the code sequence is
  178. aborted in line 4.
  179.  
  180.  Line 6 sets the new disk number to
  181. the highest number counted until now,
  182. plus 1 for the new disk. The lines of
  183. the directory, respectively the file
  184. numbers on one single disk, are
  185. counted in variable f, added in the
  186. two decimal places behind the point of
  187. variable n. At the first line of the
  188. directory, containing the disk name, f
  189. will be zero. The following directory
  190. entrys will be counted up in BASIC
  191. line 8.
  192.  
  193.  BASIC lines 10 to 90 are based on the
  194. program example in the 1541 users
  195. guide. Line 10 passes two bytes, line
  196. 20 fetches two bytes containing file
  197. length. Line 40 builds a numeric value
  198. using the ASC function with a CHR$(0)
  199. in variable c$ to prevent an error.
  200. Line 50 checks if the end of the
  201. directory is reached. If yes, the
  202. disk-/file counter is cleared to the
  203. pure disk number, the string "blocks
  204. free" is added, and the sequence is
  205. ended. (You don't have to bother about
  206. the latter because the changed I/O
  207. status will stop the repetition of the
  208. code automatically.) Line 60 waits for
  209. the opening quotation mark, line 70
  210. collects the filename into variable
  211. na$ until the closing quotation mark
  212. appears. Line 80 passes spaces, line
  213. 90 collects the file type in variable
  214. ty$.
  215.  
  216.  This code sequence will be repeated
  217. while reading entry by entry from the
  218. directory, and each entry is passed on
  219. to the worksheet in the form of the
  220. variables n, na$, bl and ty$, stored
  221. to a new row each time. If the I/O
  222. status changes, because the entire
  223. directory is read, the BASIC-cell for
  224. closing the file is called. Well, this
  225. one is easy -- just close the open
  226. file.
  227.  
  228. [NOTE]: This example is the Run It for
  229. this file. This time, after
  230. the data and program load
  231. (automatically), Press <F5>,
  232. scroll down to the bottom [OK], and
  233. press <RETURN>. (On the 1581 LOADSTAR
  234. disk, you may have some strange
  235. results because of the number of files
  236. in the directory.)
  237.  
  238.  
  239.  After importing a few directories,
  240. you are free now to process the data
  241. in any way you like. (Hopefully your
  242. game disks are not too much, because
  243. at about roughly 50 disks the memory
  244. will be filled.)
  245.  
  246.  This example was quite elaborating,
  247. but it gives an idea of the
  248. versatility of the input option. You
  249. can import data from a wordprocessor,
  250. for example, or you can set up
  251. temporary files for exchanging data
  252. between worksheets, using the export
  253. option described next.
  254.  
  255.  Please keep in mind that importing
  256. data, unlike loading a native file,
  257. will not change any existing data in
  258. the worksheet, until the variable
  259. assigned to a specific column is
  260. changed by your import row code. You
  261. can add data to an existing worksheet
  262. by inputing from disk any time, but
  263. you have to be careful concerning the
  264. handling of variables assigned to
  265. columns.
  266.  
  267.  FK
  268.  
  269.  
  270.