EasyManua.ls Logo

Commodore Plus 4 - Page 94

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...
The
BASIC
Language
2
multicolor
mode
extra
color
1
3
multicolor
mode
extra
color
2
4
screen
border
color
To
find
the
luminance
level,
type
the
number
of
the
color
source
in
parentheses.
Only
the
luminance
level
is
found.
The
luminance
level
is
stated
in
a
range
from
0
(darkest
shade)
to 7
(lightest
shade).
If
you
want
to find
the
color
number,
use
the
RCLR
function.
Examples:
PRINT
RLUM(l)
3
RND
RND
(number)
Example:
Prints
the
luminance
level
for
the
current
foreground
color.
The
level
is
found
to
be
3.
Abbr.
rN
Finds
a
random
number
between
0
and
1.
The
numbers
found
are
decimal
values.
A
negative
number
in
parentheses
reseeds
the
random
number
generator
with
that
value.
A
zero
reseeds
the
generator
from
the
system
clock.
A
positive
number
returns
the
next
number
in
the
current
random
number
sequence.
The
generator
should
be
reseeded
only
once
in
a
program.
The
numbers
in
the
sequence
should
be
used
thereafter.
Chapter
3
contains
more
information
about
mathematical
functions,
including
RND.
5
X
=
RND(O)
10
X
=
INT
(9
*
RND(l))
+
1
20
INPUT
"GUESS
A
NUMBER
BETWEEN
1
&
9";N
30
IF
N
<>
X
THEN
PRINT
"SORRY":
ELSE
PRINT
"RIGHT":
GOTO
60
40
INPUT
"GUESS
AGAIN";
A$
50
IF
A$
=
"NO"
THEN
60:
ELSE
GOTO
SO
60
INPUT
"PLAY
AGAIN"
;A$
70
IF
A$
=
"NO"
THEN
END:
ELSE
10
RUN
GUESS
A
NUMBER
BETWEEN
1
&
9? 8
SORRY
GUESS
AGAIN?
OK
Reseeds
the
generator.
Generates
a
random
whole
number
between
1
and
9.
You
can
choose
to
keep
guessing
until
you
get
the
right
answer.
To
play
again,
goes
to
get
a
new random
number.

Other manuals for Commodore Plus 4

Related product manuals