EasyManua.ls Logo

Commodore 128D - Page 283

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...
p
LET
This
tells
the
computer
to
select
the
(VIC)
text
screen
and
list
the
program
whenever
the
F7
key
is
pressed
(in
direct
mode).
CHR$(13)
is
the
ASCII
character
for
RETURN
and
performs
the
same
action
as
pressing
the
RETURN
key.
Use
CHR$(27)
for
ESCape.
Use
CHR$(34)
to
incorporate
the
double quote
character
into
a
KEY
string.
The
keys
may
be
redefined
in
a
program.
For
example:
10
KEY
2,"PRINT
DS$"
+
CHR$(13)
Thfs
tells
the
computer
to
check
and
display
the
disk
drive
error
channel
variables
(PRINT
DS$)
each
time
the
F2
function
key
is
pressed.
10
FOR
1
=
1
to
8:KEY
I,
CHR$(I
+132):NEXT
This
defines
the
function
keys
as
CHR$
133
through
CHR$
140.
To
restore
all
function
keys
to
their
BASIC
default
values,
reset
the
Commodore
128
by
pressing
the
RESET
button.
—Assigns
a
value
to
a
variable
[LET]
variable
=
expression
The
word
LET
is
rarely
used
in
programs,
since
it
is
not
necessary.
Whenever
a
variable
is
defined
or
given
a
value,
LET
is
always
implied.
The
variable
name
that
receives
the
result
of
a
calculation
is
on
the
left
side
of
the
equal
sign.
The
number,
string
or
formula
is
on
the
right
side.
You
can
only
assign
one
value
with
each
(implied)
LET
statement.
For
example,
LET
A
=
B
=
2
does
not
equate
A
and
B
to
2.
EXAMPLE:
10
LET
A
=
5
Assign
the
value
5
to
numeric
variable
A.
20
B
=
6
Assign
the
value
6
to
numeric
variable
B.
30C
=
A*B
+
3
Assign
the
numeric
variable
C,
-the
value
resulting
from
5
times
6
plus
3.,
40
D$
=
"HELLO"
Assign
the
string
"HELLO"
to
string
variable
D$.
275
BASIC
7.0
ENCYCLOPEDIA—Basic
Commands
and
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals