home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 224
/
224.d81
/
t.manual2
< prev
next >
Wrap
Text File
|
2022-08-26
|
4KB
|
149 lines
u
D A T A T O O L
RUN THE WORKSHEET
Running a worksheet means to execute
all the BASIC commands you have stored
in the worksheet. There are a few
items to set first:
The Number of passes usually will be
1, but certain mathematical operations
require a second or even an unknown
number of passes. You may set up to
999 passes - and better go to bed
then, leaving the C64 working ;-).
BASIC itself is known to be not very
fast, and in addition the system has
to do all the data transmission
between BASIC and worksheet, which
slows down the process a lot.
The Last Row Included is auto-
matically updated by the system to the
number of the last row containing
anything besides nothing. You have to
set this number yourself if you want
to fill an empty worksheet with some
data produced by BASIC.
You can use the BASIC presetting cell
for any kind of preparation, like
setting variables to a certain initial
condition, dimensioning arrays or
defining functions. This sequence will
be executed only once, at the start of
the first pass. You don't need to CLR
memory, because this is done anyway.
But if you use data statements, you
must restore in the same cell in which
the data lines are situated in order
to be able to read them in any cell.
If you push RETURN at the Okay cell,
the run will start. The system clears
the screen and prints the number of
the present pass. If you want more
interaction during the run, you can
prepare your column or row BASIC code
and print any kind of information to
the screen. Even input from the
keyboard will work, if needed.
For writing proper BASIC instructions
in your worksheet, it might be
essential to understand how the system
works, and how BASIC is executed. Here
is a brief description:
Every row, starting with the first,
is worked through.
If the row is set to data type, the
system checks which variables are
set in each column. If there is a
variable assigned to a column, the
content of the data-cell is
transferred to the variable. If the
cell is empty, the variable is set
to zero or lenghth to zero value.
After all variables are set, the
column BASIC is executed, starting
from column A to Z. After that, all
variables assigned to a certain
column are fetched from the BASIC
memory and stored back into the
worksheet. If BASIC didn't change
them, the cell content will be the
same as before. String variables
are checked before storing:
commands and unprintable characters
(graphic) are filtered out.
If the row is set to BASIC type, this
BASIC code will be executed,
instead of the column BASIC. But no
transfer between variables and
worksheet data happens yet.
If the row is set to res(ult) type,
the present content of the
variables assigned to the columns
will be transferred into the
worksheet. If these variables were
processed by a BASIC row before,
the result will be stored in the
worksheet. If not, the content will
be a carryover of the last data
row. You need to clear the
variables in BASIC, if you want to
avoid this, or to place an empty
data row before the BASIC-row.
Rows that are set to "Label" or
"Pause", will be ignored during the
run.
After working through all rows, the
system starts the next pass, if
more then one is set, without
clearing the memory.
Finally, one remarkable difference
exists, compared to usual BASIC
programs: There is no superior
STOP command, because the
BASIC sequences in the worksheet
are run one after another, and if
one is passed -- either by end or
by stop or by reaching the last
BASIC-line of a sequence -- the
system continues running and calls
the next sequence, until it has
passed the last row of the last
pass, or an error occurs. If you
want to interrupt the run on a
certain condition, you will have to
cause an error like:
if [condition] then crash
which will stop with an error
message. Another possibility is
setting the I/O status different
from 0, like
if [condition] then poke 144,1
which will stop without an error
message. Apart from that, the run
can be manually stopped with the
STOP key.
FK
MORE TO COME