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 #68 background imageLoading...
Page #68 background image
rules for XOR
PRIORITIES
The order of priority for the logical operators is (highest first):
NOT
AND
OR,XOR
For example the expression
rich OR tall AND fair
means the same as:
rich OR (tall AND fair)
The AND operation is performed first. To prove that the two logical expressions have identical effects
run the following program:
100 REMark Priorities
110 PRINT "Enter three values"\"Type 1 for Yes and 0 for No"!
120 INPUT rich,tall,fair
130 IF rich OR tall AND fair THEN PRINT "YES"
140 IF rich OR (tall AND fair) THEN PRINT "AYE"
Whatever combination of three zeroes or ones you input at line 120 the output will be either nothing
or:
YES
AYE
You can make sure that you test all possibilities by entering data which forms eight three digit binary
numbers 000 to 111
000 001 010 011 100 101 110 111
PROBLEMS ON CHAPTER 10
1. Place ten numbers in a DATA statement. READ each number and if it is greater than 20 then
print it.
2. Test all the numbers from 1 to 100 and print only those which are perfect squares or divisible
by 7
3. Toys are described as Safe (S), or Unsafe (U), Expensive (E) or Cheap (C), and either for
Girls (G),Boys (B) or Anyone (A). A trio of letters encodes the qualities of each toy. Place five
such trios in a DATA statement and then search it printing only those which are safe and
suitable for girls.
4. Modify program 3 to print those which are expensive and not safe.
5. Modify program 3 to print those which are safe, not expensive and suitable for anyone.

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