EasyManuals Logo

Radio Shack TRS-80 PC-3 User Manual

Radio Shack TRS-80 PC-3
289 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #71 background imageLoading...
Page #71 background image
lines can
make
a
program
hard
to
read
and
modify,
however,
so
it
is
good
programming
practice
to
use
them
only
where
the
state-
ments
are very simple
or
there
is
some
special reason
to
want
the
statements
on
one
line.
Also
in
this
program
we
have used
the
FO
R verb
on
line
120
and
the
N
EXT
verb
on
line
150
to
create
a
loop.
In
Example
3,
you
created
an
"infinite"
loop
which
kept
repeating
the
statements
inside
the
loop
until
you
pressed
the
~
key. With
this
FOR/
NEXT
loop,
the
PC-3
adds
1
to
N each
time
execution
reaches
the
NEXT
verb. It
then
tests
to
see if N
is
larger
than
the
limit
L.
If
N
is
less
than
or
equal
to
L,
execution
returns
to
the
top
of
the
loop
and
the
statements
are
executed
again.
If
N
is
greater
than
L,
execution
continues
with
the
160
and
the
program
stops.
You
may
use
any
numeric
variable
in
a
FO
R/N
EXT
loop. You also
do
not
have
to
start
counting
at
1
and
you
can
add any
amount
at
each
step.
See
Chapter
8
for
details.
We
have labelled
this
program
with
line
numbers
starting
with
100. Labelling
programs
with
different
line
numbers
allows
you
to
have several
programs
in
memory
at
one
time.
To
RUN
this
program
instead
of
the
one
at
line
10
enter:
RUN 100
In
addition
to
executing
different
programs
by giving
their
starting
line
number,
you
can
give
programs
a
letter
name
and
start
them
with
the
DEF
key (see
Chapter
6).
You will
notice
that
while
the
program
is
running,
the
BUSY
indicator
is
lit
at
those
times
that
there
is
nothing
on
the
display.
RUN
the
program
a
few
more
times
and
try
setting
N
at
several
different
values.
Storing Programs
in
the PC-3's Memory
You will
remember
that
settings, ReSerVe keys,
and
functions
remain
in
the
computer
even
after
it
is
turned
OFF.
Programs
also remain
in
memory
when
you
turn
off
the
PC-3,
or
it
undergoes
an
AUTO
OFF.
Even if
you
use
the
~
,CLear
or
CA
70

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Radio Shack TRS-80 PC-3 and is the answer not in the manual?

Radio Shack TRS-80 PC-3 Specifications

General IconGeneral
BrandRadio Shack
ModelTRS-80 PC-3
CategoryCalculator
LanguageEnglish

Related product manuals