EasyManua.ls Logo

Commodore Plus 4 - Page 147

Commodore Plus 4
234 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...
n
~
GET
GET
variable
list
The
GET
statement
is
a
way
to
get
data
from
the
keyboard
one
character
at
a
time.
When
the
GET
is
executed,
the
character
that
was
typed
is
received,
it
no
character
was
typed,
then
a
null
(empty)
character
is
returned,
and
the
program
continues
without
waiting
for
a
key.
There
is
no
need
to
hit
the
RETURN
key,
and
in
fact
the
RETURN
key
can
be
received
with
a
GET.
The
word
GET
is
followed
by
a
variable
name,
usually
a
string
variable.
If
a
numeric
were
used
and
any
key
other
than
a
number
was
hit,
the
program
would
stop
with
an
error
message. The
GET
statement
may
also
be
put
into
a
loop,
checking
for
an
empty
result,
which
waits
for
a
key
to
be
struck
to
continue.
The
GETKEY
statement
could
also
be
used
in
this
case.
This
command
can
only
be
executed
within
a
program.
~
GETKEY
H
~
GET#
~
EXAMPLE:
10GETA$:IFA$
"A"THEN
10
This
line
waits
for
the
A
key
to
be
pressed
to
continue.
GETKEY
variable
list
The
GETKEY
statement
is
very
similar
to
the
GET
statement.
Unlike
the
GET
statement,
GETKEY
waits
for
the
user
to
type
a
character
on
the
keyboard.
This
lets
it
be
used
easily
to
wait
for
a
single
char
acter
to
be
typed.
This
command
can
only
be
executed
within
a
program.
EXAMPLE:
10
GETKEY
A$
This
line
waits
for
a
key
to
be
struck.
Typing
any
key
will
continue
the
program.
GET#
file
number.variable
list
Used
with
a
previously
OPENed
device
or
file
to
input
one
character
at
a
time.
Otherwise,
it
works
like
the
GET
statement.
This
command
can
only
be
executed
within
a
program.
138

Other manuals for Commodore Plus 4

Related product manuals