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 #357 background imageLoading...
Page #357 background image
Programming
30
proc
getnum;
m$,min,max
rem
*****
get
number
in
range
*****
local
wrong
let
_rong=1
whi
le
wrong
print
m$;
"?
II;
error
readnum
let
wrong=errnumO
if
not
wrong
if
num<min
or
num>max
let
wrong=1
print
"Allowed
range
;s
";min;"
to
";max
endif
endif
if
wrong
print
"Try
again"
end
if
endwhi
le
endproc
Since error must be followed
by
the name
of
a procedure.
we
define readnum
to
input
a value
for
the vanable num.
proc
readnum
input
num
endprac
Suppose
you
want a procedure thaf checks that a number
is
within the range 1
to
10
You
can do
this
uSing
getnum
in
the following
way:
prac
check
getnum;
"Numeric
value?",1,10
endproc
12/S-l

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