TRS-80 MODEL III
Examples:
100 SET (RND(128) --1 ,RND(48)
-1)
Lights up a random point
on
the Display.
100 INPUTX,Y: SET (X,Y)
RUN
to see where the blocks are.
RESET(x,y)
Turns
off
a graphics blockat the location specified by the coordinatesx 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 onthe Display and moves the
cursorto the upper left corner. This wipes out alphanumeric characters as well as
graphics blocks.
CLS is very useful wheneveryou want to present an attractive
Display output.
10
CL.S
20
SET(RND(128)-1?
RND(48)-1)
30
GOTO
:;;:~({j
POINT(x,y)
Tests whetherthe specifiedgraphics block is "on" or
"off'
' . Ifthe blockis
"on"
(that is,
if
it has been
SET),
then POINT returns a binary True ( - I in Model III
BASIC).
If
the block is "off" , POINT returns a binary False (0 in Model III BASIC).Typically,
the
POINT test is put inside an IF-THEN statement.
100 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
binaryTrue, so that executionproceeds to the
THEN clause.
If
the test failed, POINT
wouldreturn a binary False, causing execution to
jump
to the ELSE statement.
8/2