EasyManua.ls Logo

Commodore Plus 4 - Page 70

Commodore Plus 4
464 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...
88
The
BASIC
Language
LET
Abbr.
IE
LET
variable
=
expression
Makes
a
variable
equal
to
a
value.
The
word
LET
may
be
(and
usually
is)
omitted
from
the
command.
The
LET
command
is
unique
in
that
its
main
keyword
is
optional.
Parameters:
variable
=
value
1.
The
variable
type
must
match
the
type
of
value
being
assigned
(e.g.,
if
the
value
is
a
text
string,
the
variable
must
be
a
text-string
variable).
If
you
want
to assign
more
than
one
variable
per
line,
separate
the
assignments
with
colons.
2.
The
value
can
be
another
variable
(X
=
Y),
a
calculation
(X
=
X
+
10),
or
a
constant
value
(X
=
18).
A
variable
can
be
equal
to
a
calculation,
including
a
formula
containing
the
variable
itself
and
another
value.
The
value
for
a
variable
can
change
during
the
program.
Examples:
10
LET
X
=
4/2*Y
Assigns
the
value
4/2*Y
to
X.
20
W$
=
"NAME"
Assigns
the
text
string
NAME
to
N$.
30
X%
=
X%
+
A
Gives
X%
the
value
of
the
answer
to
X%
+
A.
40
A
=
4:B
=
5
Assigns
the
value
4
to
A
and
the
value
5
to
B.
LIST
Abbr.
II
LIST
line
number-line
number
Displays
a
copy
of
a
BASIC
program
or
BASIC
program
lines.
Parameters:
line
number—line
number
Line
numbers
are
optional.
If
you
omit
them,
the
whole
program
is
displayed.
If
you
want
to
list
just
one
line,
type
LIST
and
the
line
number.
If
you
want
to
list
just
part
of
the
program,
type
the
first
and
last
lines
you
want
to
display.
If
you
want
to
list
the
beginning
of
the
program,
type
LIST
followed
by
a
dash
and
the
last
line
number
you
want
to
display.
If
you
want
to
list
the
end
of
the
program,
type
LIST
followed
by
the
first
line
you
want
to
see
and
then
a
dash;
do
not
add
any
ending
line.
Examples:
LIST
Displays
all
the
lines
in
the
current
program.
LIST
20
Displays
line
20
from
the
current
program.
LIST
-100
Displays
the
beginning
of
the
program
up
to
line
100.
LIST
50-
Displays
the
program
from
line
50
on.

Other manuals for Commodore Plus 4

Related product manuals