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 #151 background imageLoading...
Page #151 background image
FLASH
windows
FlASH turns the
flash
state
on
and
off.
FLASH
is
only effective
in
low resolution mode.
FlASH
will
be effective
In
the window attached
to
the speCified or default channel.
syntax:
swilch:~
numeric_expression Irange 0 .1)
FlASH [channel,] swilch
where: swilch
~
0
will
turn the
flash
off
switch
~
1
will
turn the
flash
on
example:
short
FOR
END
FOR
repetition
100
PRINT
"A
";
110
FLASH
1
120 PRINT
"flashing
";
130
FLASH
0
140
PRINT
"word"
warning
Writing over part
of
a flashing character can produce
SPUriOUS
results and should be
avoided.
The
FOR
statement
allows
a group
of
SuperBASIC statements
to
be repeated a controlled
number
of
times.
The
FOR
statement can be used
In
both a long and a short form.
NEXT and END FOR can be used together
Within
the same
FOR
loop
to
provide a
loop epilogue,
ie.
a group
of
SuperBASIC statements which
will
not be executed
If
a
loop
is
exited
via
an
EXIT
statement
but which
will
be executed
if
the
FOR
loop terminated
normally.
define:
for_ilem: = I numeric_expression
I
numenc_exp
10
numeric_exp
I numeric_exp
10
numeric_exp STEP
numeric_exp
for_list: = for
_ilem
*
[,
for_item] *
The
FOR
statement
is
followed
on
the same logical line by a sequence
of
SuperBASIC
statements. The sequence of statements
is
then repeatedly executed under the control
of
the
FOR
statement. When the FOR statement
is
exhausted, processing continues
on the next
line.
The
FOR
statement does
not
require
its
terminating NEXT or END
FOR.
Single line
FOR
loops must not be nested.
syntax:
FOR variable =
for_list:
statement *[: statement] *
example:
i.
FOR
i =
1,
2,
3,
4
TO
7
STEP
2 : PRINT i
ii.
FOR
element
=
fi
rst
TO
last:
LET
buffer(elemenO
=0
long
The
FOR
statement
is
the last statement on the
line.
Subsequent lines contain a series
of SuperBASIC statements terminated by
an
END FOR statement. The statements
enclosec between the
FOR
statement
and the
END
FOR
are
processed under the control
of
the
FOR
statement.
syntax:
FOR variable = for_list
statements
END FOR variable
example:
100
INPUT
Ildata
please"
~
x
110
LET
factorial
= 1
120
FOR
value
= x
TO
1
STEP
-1
130
LET
factorial
=
factorial
*
value
140
PRINT x I I I I
factor;
a l
150
IF
factorial>1E20
THEN
160
PRINT
"Very
large
number"
170
EXIT
value
180
END
IF
190
END
FOR
va
lue
warning
A floating
pOint
variable must be used
to
control a FOR loop.

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