Radio Shack TRS-80 User Manual page 16

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

"Why
didn't the
word
END
print?"
Answer: Because nothing
is
printed unless
it
is
the
"object" of
a
PRINT
statement.
So
how
could
we
get
the
Computer
to print
THE END
at
the
end
of the
program
execution?
Think
for a
minute
before reading
on.
98
PRINT
"
THE END
"
Erasing
Without Replacing
Just for fun,
let's
move
the
END
statement
from
line
99
to
the
largest
usable
line
number,
32767.
This
requires
two
steps.
The
first
is
to
erase
line
99.
Note
that we're
not
just
making
a
change
or correcting
an
error
in line
99
we
want
to
completely
eliminate
it
from
the
program.
Easier
done
than
said:
Type:
99
Then
nana
The
line
is
erased.
How
can
we
be
sure?
Think about
this
now. Got
it???
Sure
"pull"
a
LIST
of the
entire
program by
typing
list
BZQ3D
The
screen
should
show
the
program
with
lines 5,
10, 15,
20 and
98.
.99
should be gone.
Any
entire line
can be erased
the
same
way.
The
second
step
is
just as easy.
Type
32767 END MJHHil
.
.
.
and
the
new
line
is
entered.
Pull a
listing
of the
program
to see
if
it
was.
Was
it???
Now
RUN
the
program
to see
if
moving
the
END
statement changed
anything.
Did
it???
It
shouldn't have.
Other Uses
for
END
Move
END
from
#32767
to
line
#17,
then
RUN. What
happened?
It
ENDed
the
RUN
after
printing
line
10
and
a space.
RUNit
several
times.
Now moveENDto
line
13 and
RUN
.
Then
to
line
8
and
RUN. Do
you
see the effect
END
has,
depending where
it
is
placed (even temporarily)
in
a
program?
14
This
will
work
if
line
#98
is
th&
last
PEINT
statement
in
yautprc^raKi.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents