EasyManua.ls Logo

Radio Shack TRS-80 - Page 59

Radio Shack TRS-80
236 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
Loading...
. . .
and
it
will
automatically pick
up and print
the
rest of the
chart, or until
it hits
another
stop
you may
have
placed.
At
Last
Our ultimate
plan
is to build
a timer into
the
program
so
as not to
completely
STOP execu-
tion,
but
merely
delay it
so we can
study
the display.
Type
85 IF R<> 600 THEN
90
87
FOR
X
=
1 TO
500
88 NEXT X
...
and
RUN
Hey!
It really works!
As long
as R does
not equal
600
the
program
skips
over
the delay
loop
in lines
87
and
88.
when
R does equal
600,
the
test
"falls
through"
and
lines
87
and
88
"play
catch"
500
times,
delaying
the
program's
execution
for
about one
second.
It's
been a long and tortuous
route with numerous
scenic side
trips,
but we finally
made it.
Now that you have picked
up so many
smarts
in
these two
lessons
on
FOR-NEXT,
it's your
turn
to put them to work.
EXERCISE
11-2:
Modify the
resident
program
so
that
( MPH ) appears
below
RATE,
(HOURS) appears
belowTIME and
(MILES)
appears
below
DISTANCE
,
This
one
should
be
a breeze
for
you.
EXERCISE
U-3: Design, write and
run a program which
will calculate
and print income
at
a yearly, monthly,
weekly and
daily
rate, based
on a 40-hour
week, a l/12th-year month,
and
a
52-week
year. Do this
for yearly
incomes
between
$5,000
and
$25,000
in
$1,000
increments.
Document
your
program with
REM statements
as necessary
to
explain
the
equations you create;.
Same: of
our
programs am
becoming*
jitfietoo
long
for us to leave
space
in
the manual for
you
to
write
;
la your idfel*.
ihroffi
now
on,
use the
pad
of
Fto'grammmg
paper for working up
your
asWeis^
57

Other manuals for Radio Shack TRS-80

Related product manuals