EasyManua.ls Logo

Commodore 128D - Page 275

Commodore 128D
427 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...
j i
I
1
GET
i
\
EXAMPLE:
10
FOR
L
=
20
FOR
A
=
30
NEXT
A
40
NEXT
L
1
TO
100
5
TO
11
STEP
.5
The
FOR
...
NEXT
loop
in
lines
20
and
30
are
nested
inside
the
one
in
line
10
and
40.
Using
a
STEP
increment
of
.5
is
used
to
illustrate
'
the
fact
that
floating
point
indices
are
valid.
NEXT
variable
lists
may
be
combined.
For
example,
30
NEXT
A,
L
could
be
used
in
place
of
lines
30
and
40
above.
—Receive
buffered
input
data
from
the
keyboard,
one
character
at
a
time,
without
waiting
for
a
key
to
be
pressed
GET
variable
list
The
GET
statement
is
a
way
to
receive
buffered
data
from
the
key
board,
one
character
at
a
time.
When
GET
is
encountered
in
a
pro
gram,
the
character
that
is
typed
is
stored
in
the
C128
memory.
If
no
character
is
typed,
a
null
(empty)
character
is
returned,
and
the
pro
gram
continues
without
waiting
for
a
key.
There
is
no
need
to
hit
the
RETURN
key.
The
word
GET
is
followed
by
a
variable
name,
either
numeric
or
string.
If
your
program
specifies
a
numeric
key
and
a
key
besides a
number
is
pressed,
the
program
stops
and
an
error
message
is
displayed.
The
GET
statement
may
also
be
put
into
a
loop,
checking
for
an
empty
result.
The
GETKEY
statement
could
also
be
used
in
this
case.
See
GETKEY
for
more
information.
The
GET
and
GETKEY
statements
can
be
executed
only
within
a
program.
EXAMPLE:
10
DO:GETA$:LOOP
UNTIL
A$
=
"A"
20
GET
B,
C,D
This
line
waits
for
the
A
key
to
be
pressed
to
continue.
GET
numeric
variables
B,C
and
D
from
the
keyboard
buffer
without
waiting
for
a
key
to
be
pressed.
267
BASIC
7.0
ENCYCLOPEDIA—Basic
Commands
and
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals