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 #13 background imageLoading...
Page #13 background image
35
It is as though an empty line has replaced the previous one.
OUTPUT- PRINT
Note how useful the PRINT statement is. You can PRINT text by using quotes or apostrophes:
PRINT "Chocolate bars"
You can print the values of variables (contents of pigeon holes) by typing statements such as:
PRINT bars
without using quotes.
You will see later how very versatile the PRINT statement can be in SuperBASIC. It will enable you to
place text or other output on the screen exactly where you want it. But for the present these two
facilities are useful enough:
printing of text
printing values of variables (contents of pigeon holes).
INPUT- INPUT, READ AND DATA
A carpet-making machine needs wool as input. It then makes carpets according to the current design.
If the wool is changed you may get a different carpet.
The same sort of relations exist in a computer.
However, if the data is input into pigeon holes by means of LET there are two disadvantages when
you get beyond very trivial programs:
writing LET statements is laborious
changing such input is also laborious
You can arrange for data to be given to a program as it runs. The INPUT statement will cause the
program to pause and wait for you to type in something at the keyboard. First type:
NEW
so that the previous stored program (if it is still there) will be erased ready for this new one. Now type:
10 LET price = 15
20 PRINT "How many pens?"
30 INPUT pens
40 LET cost = price * pens
50 PRINT cost
RUN
The program pauses at line 30 and you should type the number of pens you want, say:

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