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 #154 background imageLoading...
Page #154 background image
syntax:
example:
IF expression THEN
statements
[ELSE
statements]
END
IF
100
LET
limit;
10
110
INPUT
"Type;
n a number
ll
! number
120
IF
number>
Limit
THEN
130
PRINT
"Range
error"
140
ELSE
150 PRINT
"Inside
limit"
160
END
IF
In
all
three forms
of
the
IF
statement
the
THEN
is
optional.
In
the
short
form
it
must comment
be replaced
by
a colon
to
distinguish
Ihe
end
of
the
IF
and the
start
of
the
next
statement.
In
the long
form
it
can be removed completely.
IF
statements
may
be
nested
as
deeply
as
the
user
requires
(subject
to
available
memory).
nesting
However,
confUSion
may
arise
as
to
which ELSE, END
IF
etc matches which
IF
SuperBASIC
will
match nested ELSE statements
etc
to
the closest
IF
statement,
for
example:
100IFa;bTHEN
110
IFc;dTHEN
120
PRINT
"errorll
130
ELSE
140
PRINT
"no
error"
150
END
IF
160
ELSE
170
PRINT
"not
checked
ll
180
END
IF
The
ELSE
at
line
130
is
matched
to
the
second
IF.
The
ELSE
at
line
160
is
matched
with
the
first
IF
(at
line
100).
This
sets
the current ink
colour,
i.e.
the colour
in
which the output
is
written. INK
will
be effective
for
the window attached
to
the
specified
or
default channel.
syntax:
INK [channel,] colour
example:
i.
INK 5
ii.
INK6,2
iii.
INK
#2,255
12/84
INK
windows

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