EasyManuals Logo

Sinclair QL User Manual

Sinclair QL
422 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
Page #100 background imageLoading...
Page #100 background image
Method
At
any
time while
the
snake
IS
still
on
the
screen
you
choose a random length and
Ink
colour
easily.
The direction may be selected
by
a number
1,2,3
or
4
as
shown:
North
1
West
4
South 3
Design
Select PAPER
Set
snake
to
centre
of
window
REPeal
Choose
direction,
colour,
length
of
growth
FOR unit
~
1
to
growth
Make snake
grow,
north, south,
east
or
west
IF
snake
IS
off
window THEN EXIT
END FOR
END REpeal
PRINT end message
East
2
84
Program
100
REMark
Magi
c
Snake
110
PAPER
0 :
CLS
120
LET
aCross
=
50
:
up
=
50
130
REPeat
snake
140
LET
di
rection
= RND(1
TO
4)
coLour
RND(2
TO
7)
150
LET
growth
= RND(2
TO
20>
160
INK
coLour
170
FOR
unit
= 1
TO
growth
180
SELect
ON
direction
190
ON
direction
= 1
200
LET
up
=
up
+ 1
210
ON
direction
=2
220
LET
across
=
across
+ 1
230
ONdirection=3
240
LET
up
=
up
- 1
250
ON
di
rection
= 4
260
LET
across
=
across
- 1
270
END
SELect
280
IF
across<1
OR
across>99
OR
up<1
OR
up>99
THEN
EXIT
snake
290
POINT
across,up
300
END
FOR
unit
310
END
REPeat
snake
320
PRINT
"Snake
off
edge"
The
syntax
of
the
SElect
ON structure also allows
for
the possibility
of
selecting on a
list
of
values
such
as
5,6,8,10
TO
13
It
IS
also
possible
fo
allow for
an
action
to
be
executed
If
none
of
the
stated
values
is
found. The
full
structure
is
of
the
form given below
12/84

Other manuals for Sinclair QL

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sinclair QL and is the answer not in the manual?

Sinclair QL Specifications

General IconGeneral
ProcessorMotorola 68008
Clock Speed7.5 MHz
RAM128 KB (expandable to 640 KB)
ROM48 KB
Operating SystemSinclair QDOS
Release Year1984
StorageMicrodrive tape loop
Graphics256x256 pixels, 8 colors
PortsRS-232, ROM cartridge
SoundBeeper (internal speaker)

Related product manuals