Radio Shack TRS-80 User Manual page 92

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

Advertisement

A
Voice
from
the
Past
Remember how
in
a very
early
chapter
we
checked
the contents of each
Numeric
Variable
address,
A
through
Z,
by
using the calculator
mode?
PRINT AjBtCjDjE;
etc.
We
can
do
the
same
thing
with our
two
new
Strings.
Type:
PRINT A$jB$
Why
does
it
display
TRS-80TRS—
80
?
The
first
TRS-80
is
simple
it
was
the
last
string
read
by
A$.
Same
thing
with B$.
Even
though
B$
was
not used
in
solving
the
last
problem,
it
was
used
in
the
earlier
example,
and
if
the
Computer
was not
turned
off since then,
it
was
held
in
memory.
This
fact
is
more
than
a laboratory
curiosity.
It
can
get
you
into
"unexplainable"
programming
problems
if
you're
not aware
of
it.
Oh,
by
the
way
.
.
.
There
isn't
room
in
LEVEL
I
BASIC
to
do
everything, obviously,
and
we
promised
earlier
that
you
would
learn
how
to
answer
"YES"
and
"NO"
to the
Computer.
LEVEL
II
allows
you
to
do
it
in
a straight-forward
manner. Here
in
LEVEL
I
we
have
to
be
sneakier.
Enter
this
program:
10
Y
=
1
20
N =
30
INPUT
"ARE
YOU OLD ENOUGH
TO
VOTE
(Y/N)"jA
40 IF
A
=
1
THEN
60
50
PRINT "DON'T
FRET. THE
TIME WILL PASS FAST
ENOUGH."
59
END
60
PRINT "SWELL. DON'T FORGET
TO
REGISTER!"
.
.
.
and
RUN.
90

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents