EasyManuals Logo

Sinclair QL Beginner's Guide

Sinclair QL
135 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 #9 background imageLoading...
Page #9 background image
9
Again be careful to put a space after PRINT.
To solve the problem we can write a program which is a sequence of instructions or statements. You
can now understand the first two:
LET dogs = 9
LET days = 28
These cause two pigeon holes to be set up, named, and given numbers or values. The next
instruction must perform a multiplication, for which the computer's symbol is *, and place the result in
a new pigeon hole called tins thus:
LET tins = dogs * days
1. The computer gets the values, 9 and 28, from the two pigeon holes named dogs and days
2. The number 9 is multiplied by 28.
3. A new pigeon hole is set up and named tins.
4. The result of the multiplication becomes the value in the pigeon hole named tins.
All this may seem elaborate but you need to understand the ideas, which are very important.
The only remaining task is to make the computer print the result which can be done by typing
PRINT tins
which will cause the output:
252
to be displayed on the screen.
In summary the program:
LET dogs = 9
LET days = 28
LET tins = dogs * days
PRINT tins
causes the internal effects best imagined as three named pigeon holes containing numbers:
dogs
9
days
28
=
252
and the output on the screen:
252
Of course, you could achieve this result more easily with a calculator or a pencil and paper You could
do it quickly with the QL by typing:
PRINT 9 * 28
which would give the answer on the screen. However the ideas we have discussed are the essential
starting points of programming in SuperBASIC. They are so essential that they occur in many
computer languages and have been given special names.

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