Chapter
6:
Graphics 177
restriction
is
that you can't completely fill the screen, since you will need
room
to
insert the
PRINT
statements.
N ow experiment a bit with some of your own designs.
For
the moment,
stay away from reversed characters. They require some special handling that
we'll cover in the next section.
Using
Reversed
Characters
You may have already noticed that reversed characters have a special
use in
PRINT
statements: They represent keys
that
do not generate "nor-
mal" characters, such as
HOME, the cursor controls, and the color keys.
If
you enter a reversed character directly into a
PRINT
statement, one
of
the
following two things will happen:
. The character will be interpreted as a "special key"
to
move the
cursor, change the color, and so on, or
. The character will not match any
ofthe
special keys; it will be stored
as a nonreversed character when you press
RETURN. This will
happen
even
if
the
character
appears
between quotes in the
program.
To
PRINT
a single reversed character within a string, enter a RVS ON
(CTRL-9)
before the reversed
chara~ter.
The character itself must appear in
the
PRINT
statement as a
"normal"
(nonreversed) character.
If
you are
building
PRINT
statements from a screen sketch, you can insert the RVS ON
using the INST key. Remember
that
pressing the INST key puts you in quote
mode for one character, so the
RVS ON will be stored as part
ofthe
PRINT
statement instead
of
being executed.
The "reverse
on"
is
reset automatically
at
the end
of
the
PRINT
line.
(Remember
that
a
PRINT
line can span more
than
one line on the screen. A
RETURN indicates the end of a
PRINT
line.
If
a
PRINT
statement ends with
a semicolon, BASIC does not add a carriage return, and characters will still
be displayed in reverse.)
If
normal characters follow the reversed ones on the
PRINT
line, insert a RVS
OFF
(CTRL-O) before the first nonreversed charac-
ter. Otherwise, the
RVS
OFF
is
not needed.
To
illustrate the problem and solution,
we
will modify the Diamond
program to produce a solid block instead
of
an
outline. Follow the steps
displayed in Figure 6-3, but use different characters to make up the player.