99
GOTO
99
What
happens if
you
replace the
*
in line
40
with
a
+?
After
you
think you have it figured
out,
do
it
and
see the result.
Did you guess
right???
There's
More?
Oh,
yes
—
the
only limit is
your
imagination.
See how easily the logical
notation
makes the
drawing
of
lines? Type and RUN:
10 CLS
20 FDR X=0 TO
127
30
FOR Y=0 TO 47
40 IF ( X
=
64
)
+
( Y
=
24 ) THEN 60
50 SET (X,Y)
60 NEXT Y
70
NEXT
X
99 GOTO 99
What
happens
to
the program if you replace
+
(OR)
with
*
(AND)?
Sketch your estimated
result,
then change line
40
and
try it.
Hope you got it
right.
If not, it really sneaked up on you,
didn't it!
Using
the INT function
we
can create an elaborate checkerboard. The reasoning is:
In
the horizontal dimension.
The
INT(X/16)*16-X will equal when
X equals
0,
16,
32, 48, 64, 80,
96 and 112
In the vertical dimension
The
INT(Y/6)*6—
Y
will
equal when
Y
equals
0,
6,
12, 18, 24, 30,
36 and 42.
Vt&
fBS
EAKj
ta;^t
: out
at the
program's
eadiess
toe|*;.;:'::-.
:;::
.
.'.'':.'
:
.
;
.
:
:
:'".'.;.
:
-
'.
:''
;
.:77k:
r
;'.':':
;
.
..'
;.
:
7
Oh c©rae:08yii*s*ery .$&$&>
tfjKHi
take
the
tii
and thiBtk it
iimmgfal
151