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

  1. u
  2.            D A T A T O O L
  3.  
  4.  
  5. RUN THE WORKSHEET
  6.  
  7.  Running a worksheet means to execute
  8. all the BASIC commands you have stored
  9. in the worksheet. There are a few
  10. items to set first:
  11.  
  12.  The Number of passes usually will be
  13. 1, but certain mathematical operations
  14. require a second or even an unknown
  15. number of passes. You may set up to
  16. 999 passes - and better go to bed
  17. then, leaving the C64 working ;-).
  18. BASIC itself is known to be not very
  19. fast, and in addition the system has
  20. to do all the data transmission
  21. between BASIC and worksheet, which
  22. slows down the process a lot.
  23.  
  24.  The Last Row Included is auto-
  25. matically updated by the system to the
  26. number of the last row containing
  27. anything besides nothing. You have to
  28. set this number yourself if you want
  29. to fill an empty worksheet with some
  30. data produced by BASIC.
  31.  
  32.  You can use the BASIC presetting cell
  33. for any kind of preparation, like
  34. setting variables to a certain initial
  35. condition, dimensioning arrays or
  36. defining functions. This sequence will
  37. be executed only once, at the start of
  38. the first pass. You don't need to CLR
  39. memory, because this is done anyway.
  40. But if you use data statements, you
  41. must restore in the same cell in which
  42. the data lines are situated in order
  43. to be able to read them in any cell.
  44.  
  45.  If you push RETURN at the Okay cell,
  46. the run will start. The system clears
  47. the screen and prints the number of
  48. the present pass. If you want more
  49. interaction during the run, you can
  50. prepare your column or row BASIC code
  51. and print any kind of information to
  52. the screen. Even input from the
  53. keyboard will work, if needed.
  54.  
  55.  For writing proper BASIC instructions
  56. in your worksheet, it might be
  57. essential to understand how the system
  58. works, and how BASIC is executed. Here
  59. is a brief description:
  60.  
  61.  Every row, starting with the first,
  62.    is worked through.
  63.  
  64.  If the row is set to data type, the
  65.    system checks which variables are
  66.    set in each column. If there is a
  67.    variable assigned to a column, the
  68.    content of the data-cell is
  69.    transferred to the variable. If the
  70.    cell is empty, the variable is set
  71.    to zero or lenghth to zero value.
  72.    After all variables are set, the
  73.    column BASIC is executed, starting
  74.    from column A to Z. After that, all
  75.    variables assigned to a certain
  76.    column are fetched from the BASIC
  77.    memory and stored back into the
  78.    worksheet. If BASIC didn't change
  79.    them, the cell content will be the
  80.    same as before. String variables
  81.    are checked before storing:
  82.    commands and unprintable characters
  83.    (graphic) are filtered out.
  84.  
  85.  If the row is set to BASIC type, this
  86.    BASIC code will be executed,
  87.    instead of the column BASIC. But no
  88.    transfer between variables and
  89.    worksheet data happens yet.
  90.  
  91.  If the row is set to res(ult) type,
  92.    the present content of the
  93.    variables assigned to the columns
  94.    will be transferred into the
  95.    worksheet. If these variables were
  96.    processed by a BASIC row before,
  97.    the result will be stored in the
  98.    worksheet. If not, the content will
  99.    be a carryover of the last data
  100.    row. You need to clear the
  101.    variables in BASIC, if you want to
  102.    avoid this, or to place an empty
  103.    data row before the BASIC-row.
  104.  
  105.  Rows that are set to "Label" or
  106.    "Pause", will be ignored during the
  107.    run.
  108.  
  109.  After working through all rows, the
  110.    system starts the next pass, if
  111.    more then one is set, without
  112.    clearing the memory.
  113.  
  114.  Finally, one remarkable difference
  115.    exists, compared to usual BASIC
  116.    programs: There is no superior
  117.    STOP command, because the
  118.    BASIC sequences in the worksheet
  119.    are run one after another, and if
  120.    one is passed -- either by end or
  121.    by stop or by reaching the last
  122.    BASIC-line of a sequence -- the
  123.    system continues running and calls
  124.    the next sequence, until it has
  125.    passed the last row of the last
  126.    pass, or an error occurs. If you
  127.    want to interrupt the run on a
  128.    certain condition, you will have to
  129.    cause an error like:
  130.  
  131.       if [condition] then crash
  132.  
  133.    which will stop with an error
  134.    message. Another possibility is
  135.    setting the I/O status different
  136.    from 0, like
  137.  
  138.     if [condition] then poke 144,1
  139.  
  140.    which will stop without an error
  141.    message. Apart from that, the run
  142.    can be manually stopped with the
  143.    STOP key.
  144.  
  145.  FK
  146.  
  147.              MORE TO COME
  148.  
  149.  
  150.