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 #10 background imageLoading...
Page #10 background image
1. Names such as dogs, days and tins are called identifiers.
2. A single instruction such as:
LET dogs = 9
is called a statement.
3. The arrangement of name and associated pigeon hole is called a variable. The execution of
the above statement stores the value 9 in the pigeon hole 'identified' by the Identifier dogs.
A statement such as:
LET dogs = 9
is an instruction for a highly dynamic internal process but the printed text is static and it uses the =
sign borrowed from mathematics. It is better to think or say (but not type):
LET dogs become 9
and to think of the process having a right to left direction (do not type this):
dogs 9
The use of = in a LET statement is not the same as the use of = in mathematics. For example, if
another dog turns up you may wish to write:
LET dogs = dogs + 1
Mathematically this is not very sensible but in terms of computer operations it is simple. If the value of
dogs before the operation was 9 then the value after the operation would be 10. Test this by typing:
LET dogs = 9
PRINT dogs
LET dogs = dogs + 1
PRINT dogs
The output should be:
9
10
proving that the final value in the pigeon hole is as shown:
dogs
9
A good way to understand what is happening to the pigeon holes, or variables, is to do what is called
a "dry run". You simply examine each instruction in turn and write down the values which result from
each instruction to show how the pigeon holes are set up and given values, and how they retain their
values as the program is executed.
LET dogs = 9
LET days = 28
LET tins = dogs * days
PRINT tins
The output should be

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