EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 196

Radio Shack TRS-80 Model III
274 pages
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...
TRS-80
MODEL
Examples:
1
00 SET (RND(1
28)
-
1
,RND(48)
-
1
)
Lights
up a random point on the
Display.
100
INPUT X,Y:SET(X,Y)
RUN to see
where the blocks are.
RESET
(x,y)
Turns off
a
graphics block
at
the location specified by
the coordinates
x
and
y.
This
function has the same limits and parameters
as
SET(x,y).
200 RESET (X,3)
CLS
"Clear-Screen' '
turns off all the graphics blocks
on the Display and
moves the
cursor to the upper left corner.
This wipes
out
alphanumeric characters
as
well
as
graphics blocks. CLS is very
useful whenever you want to present an attractive
Display output.
10 CLS
20 SET(RND(128)-1»
RND
<
48
)
--1
>
30 GOTO 20
POINTfjcj)
Tests whether the specified graphics block
is
"
on
"
or
"
off
' .
If the block
is
"
on
"
(that
is
,
if
it
has
been SET)
,
then POINT returns
a
binary True
(
- l in
Model III
BASIC)
.
If
the
block
is
"
of
f
"
,
POINT returns
a
binary False
(0
in
Model III
BASIC) .
Typically
,
the POINT test is put inside an IF-THEN statement.
1
00
SET
(50,
28)
: IF POINT
(50,28)
THEN PRINT "ON" ELSE PRINT "OFF"
This line will always print the message, "ON", because POINT(50,28) will return
a
binary True
,
so that execution proceeds
to
the THEN clause
.
If the
test
failed
,
POINT
would return
a
binary False, causing execution
to
jump
to the
ELSE
statement.
186

Other manuals for Radio Shack TRS-80 Model III

Related product manuals