Commodore VIC-20 User Manual page 134

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

Advertisement

(
INPUT
(
The INPUT statement allows the computer to get data into a variable
r
from the person running the program. The program will stop, print
a question mark (?) on the screen, and wait for the person to type the
answer and hit the RETURN key.
The work INPUT is followed by a variable name or list of variable
names separated by commas. There may be a message inside of
quotes before the list of variables to be input. If this message (called
a prompt) is present, there must be a semicolon (;) after the last quote
of the prompt. When more than one variable is to be INPUT, they
g"
should be separated by commas when typed in.
EXAMPLE:
c
10 INPUT-PLEASE TYPE A #";A
20 INPUT"AND YOUR NAME";A$
.
30 INPUT B$
/■
40 PRINT"BET YOU DIDN'T KNOW
WHAT I WANTED!"
(
I
INPUT*
This works like INPUT, but takes the data from a previously OPENed
file or device.
LET
The word LET itself is hardly ever used in programs, since it is op
tional, but the statement is the heart of all BASIC programs. The
variable name which is to get the result of a calculation is on the left
side of the equal sign, and the number or formula is on the right side.
EXAMPLE:
10LETA = 5
(
20 B = 6
(
30C = A*B + 3
(
124

Advertisement

Table of Contents
loading

Table of Contents