EasyManua.ls Logo

Radio Shack TRS-80

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...
Chapter
7
It
Also
Talks
and Listens
Begin
this lesson
by typing
in the
sample
answer
program
to
Exercise
#6-2:
By now you have
probably
gotten
tired
of
having
to
retype
line
10
over
each time
you wish
to change the
value
of
A. The INPUT
statement
is
a simple,
faster
and
more
convenient
way
to accomplish the
same thing.
It's
a biggie,
so
don't miss
any points.
Add the following
lines
to
the
resident
program:
5
PRINT
"
THE
VALUE
I
WISH
TO
GIVE
A
IS"
10 INPUT
A
Now
RUN
The
Computer
should
print:
THE
VALUE
I
WISH
TO
GIVE
A IS
?_
See
the
question
mark
on the
screen.
It
means,
"It's
your turn
and I'm
waiting
. .
."
Enter
a number
and see
what
happens.
It
should
be identical
to
what
happened
when you
typed
in
the same
number
earlier
by
changing
line
10.
Run
the
program
several
more times
to
get the
feel of the
INPUT
statement.
Pretty
powerful,
isn't
it?
Let's
add
a touch
of class
to the
INPUT
process
by retyping
line
5 as follows:
5
PRINT
"THE
VALUE
I WISH
TO
GIVE A
I
S
"
t
Look
at that
line
very
carefully.
Do
you see
how it differs
from
the
earlier
line
5???
It is
different
A semicolon
has been
added
at the
end
of
the
line.
Reddest
remember,
that's the
program
that is
now
presiding
in the
Computer.
.?:-
33

Other manuals for Radio Shack TRS-80

Related product manuals