Commodore VIC-20 User Manual page 94

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

And the VIC responds:
c
i
1 INPUT "WHATS YOUR NAME";A$
2 PRINT" HI/1 A$
3 GOTO 2
WHAT'S YOUR NAME?
Notice that
the computer
automatically
adds the question^
mark (?) to show
^
you that it's
waiting for
an input.
At which point you type in the customary response or if your
name happens to be VIC you can type:
fvl m [cl and
<
c
And whoopee! Your name splashed all over the screen! To
slow down the show just press the fl^^ key. When you
are ready to leave stardom behind, press the
To enter another name just type RUN and you
same prompt again. The prompt in this case is:
WHAT'S YOUR NAME?
Prompts are questions directed to you in an effort to get En-
formation into the VIC. The VIC has a limited number of ways
to get information from the human world. Perhaps the most
useful method for the computer to collect information from
our keyboard is the INPUT statement. Lei's go through the
steps of our program. Here's what we told VIC to do:
First, display the message "WHAT'S YOUR NAME" on the
screen and then wait for you to put in (or fNPUT) characters
from the keyboard. Take the response and name it "AS". In
our example "VIC" becomes AS. This is a kind of shorthand
for the computer.
Second, print the word "HI" followed by whatever was typed
at the keyboard. In our example we print HI VIC.
84
C
(
C
<
<
(
c
c
c
c
I

Advertisement

Table of Contents
loading

Table of Contents