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 #53 background imageLoading...
Page #53 background image
You
can score a maximum
of
14
pOints
from the following
test.
Check your score with
the answers
on
page
11G.
1.
How
do
we
normally tackle the problem of great
Size
and complexity
in
human
affairs?
SELF
TEST
ON
CHAPTER
7
FOR
SERVICE
MANUALS
CONTACT:
MAURITRON
TECHNICAL
SERVICES
www.mauritron.co.uk
TEL:
01844
.
351694
FAX:
01844
-
352554
2.
3
4.
5.
6.
'1
8
9.
10.
11.
1.
2.
3.
4.
5.
6
1//84
How can this principle be applied
in
programming?
What are
the
two
most obvious
features
of
a simple procedure definition?
(two
pOints)
What are the two main effects of using a procedure name
to
tall' the procedure?
(two points)
What
is
the advantage of
uSing
procedure names
in
a main program before the
procedure definitions are written?
What
is
the advantage of
Writing
a procedure definition before
uSing
itS
name
in
a main program?
How can the
use
of procedures help a thirty·line·programmer'
to
write
much bigger
programs?
Some programs use more memory
in
defining procedures, but
in
what
circumstances
do
procedures
save
memory space?
Name two
ways
by which information can be passed from a main program
to
a procedure. (two points)
What
is
an
actual parameter?
What
is
a formal parameter?
Write a procedure
WhiCh
outputs one of the four suits: 'Hearts: 'Clubs: 'Diamonds:
or 'Spades: Call the procedure
five
times
to
get five random
suits.
Write another program
for
problem 1 using a number
in
the range 1
to
4
as
a
parameter
to
determine the output word.
If
you have already done
thiS,
then try
writing the program
Without
parameters.
Write a procedure which
will
output the value of a card that
is
a number
in
the
range 2
to
10
or one
of
the words
'Ace:
~ack:
'Queen:
'King'.
Write a program which calls this procedure five times so that
five
random values
are output.
Write the program of problem 3 again
USing
a number
In
the range 1
to
13
as
a parameter
to
be passed
to
the procedure.
If
this was the method
you
used first
time,
then try writing the program without parameters.
Write the most elegant program
you
can, using procedures,
to
output four hands
of
five
cards each. Do not worry about duplicate cards.
You
can
take
elegance
to
mean an appropriate mixture of readability, shortness and efficiency. Different
people and/or different circumstances
will
place different importance
on
these three
qualities which sometimes work against each
other.
PROBLEMS
ON
CHAPTER
7
37

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