EasyManua.ls Logo

Commodore VIC-20 - Page 36

Commodore VIC-20
308 pages
Print Icon
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...
I
I
EXAMPLE:
100
FOR
L
- 100
TO
0
STEP
-1
100
FOR
L
=
PI
TO
6*PI
STEP
.01
100
FOR
AA
=
3
TO
3
GET
Format:
Abbreviation:
Screen
Display:
GET
variable
gI:^;;"
|e
G
£j
This
statement
lets
you
inpul
one
character
at
a
time
from
the
keyboard.
Whatever
character
was
hit
goes
into
the
variable.
If
no
key
was
pressed,
a
zero
is
placed
in
a
numeric
variable,
or
an
empty
value
(Ih")
in
a
string
variable.
This
differs
from
the
INPUT
statement
in
one
major
respect:
if
no
key
is
typed,
the
program
continues
running
here,
and
in
the
INPUT
statement
it
waits
for
the
user
to
type
something.
The
GET
statement
is
usualry
placed
in
a
loop
to
wait
for
the
keystroke.
EXAMPLE
1:
10
GET
AS:
IF
AS
=
""
THEN
10
The
GET
can
also
be
used
to
allow
the
program
to
continue
processing
while
waiting
for
data.
Example
2
is
a
simple
GET
editor
with
a
blinking
cursor.
EXAMPLE
2:
10
C
=
0
:
Q
=
18
20
GET
A$
:
C
=
C
+
1
30
IF
C
=
10
THEN
Q
=
164
-
Q
:
C
=
0
40
PRINT
CHRS(Q)
CHRS{32}
CHRS(146)
CHRS(157);
50
PRINT
AS;
:
GOTO
20
GOSUB
Format:
Abbreviation:
Screen
Display:
GOSUB
line
number
GoBjvi
Is
GO
[vj
I
20
I

Other manuals for Commodore VIC-20

Related product manuals