EasyManua.ls Logo

Commodore Plus 4 - CONTROL; CHAPTER 3 Using Software

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...
BASIC
Version
3.5
Commands,
Functions,
and
System
Variables
21
and
CLEAR—has
a
unique
character-string
value
that
can
be
called
by
its
CHR$
code.
You
can
use
CHR$
values
to
do
anything
to
the
screen
output
that
you
can
do
by
pressing
a
key,
such
as
changing
character
colors,
turning
on
reversed-
image
mode,
or
deleting
a
character.
Printing
the
CHR$
value
to
the
screen
has
the
same
effect
as
pressing
the
key.
For
example,
PRINT
CHR$(77)
is
the
same
as
PRINT
"M".
This
feature
of
CHR$
is
especially
useful
when
you
want
to
defer
the
"pressing"
of
a
key.
For
example,
in
a
BASIC
program
the
only
way
to
print
a
message
that
contains
a
quotation
mark
is
to
use
the
CHR$
code
for the
quotation
mark:
PRINT
"IBM'S
MOTTO
IS
";CHR$(
34);
"THINK";
CHR$(34)
IBM'S
MOTTO
IS
"THINK"
If
you
actually press
the
quotation
mark
key
when
you
type
the
line,
the
quotation
mark
opens
or
closes
quote
mode:
PRINT
"IBM'S
MOTTO
IS
"THINK""
IBM'S
MOTTO
IS
0
In
the
second
PRINT
command
example,
the
computer
assumes
the
quote
before
THINK
turns
off
quote
mode.
The
computer
also
assumes
that
THINK
is
a
variable
name,
which
is
why
the
0
is
printed.
The
only
way
to
print
the
quotation
mark
as
a
character
is
to
use
its
character
code
in
a
CHR$
function.
The
CHR$
function
is
frequently
used
in
function-key
definitions
to
print
a
quotation
mark
or
"press"
a
RETURN
key
at
the
end
of
the
key
definition.
Appendix
C
lists all
the
CHR$
values.
Appendix
D
contains
the
standard
ASCII
codes
that
are
used
by
many
computers
for
your
reference.
To
find
a
CHR$
value,
you
can
use
the
ASC
function,
which
finds
the
code
for
any
key.
CHR$
codes
are
used
in
I/O
to
devices
other
than
the
screen
as
well.
The
printable
characters
are
generally
the
same,
but
the
control
functions
will
be
different
with
a
printer,
for
example,
than
with
the
screen.
Example:
PRINT
CHR$(S8);
A;
CHR$(1S9);
B
Changes
the
character
color
to
red,
prints
the
value
for
A,
changes
the
character
color
to
orange,
and
prints
B.
CIRCLE
Abbr.
cl
CIRCLE
color
source,
center
coordinates,
x
radius,
y
radius,
start
arc,
end
arc,
angle,
increment
This
graphic
mode
command
draws
circles
as
well
as
a
variety
of
other
shapes.
CIRCLE
draws
curved
shapes
such
as
arcs
and
ovals.
CIRCLE
also
draws
any

Other manuals for Commodore Plus 4

Related product manuals