Sinclair QL Beginner's Manual page 32

Hide thumbs Also See for QL:
Table of Contents

Advertisement

100 PRINT "First"
110 PRINT "Second"
If you type:
LOAD mdv1_prog1
followed by:
MERGE mdv1_prog2
The two programs will be merged into one. To verify this, type LIST and you should see:
100 PRINT "First"
110 PRINT "Second"
If you MERGE a program make sure that all its line numbers are different from the program already in
main memory. Otherwise it will overwrite some of the lines of the first program. This facility becomes
very valuable as you become proficient in handling procedures. It is then quite natural to build a
program up by adding procedures or functions to it.
GENERAL
Be careful and methodical with cartridges. Always keep one back-up copy and if you suspect any
problem with a cartridge or microdrive keep a second back-up copy. Computer professionals very
rarely lose data. They know that even with the best machines or devices there will be occasional
faults and they allow for this.
If you want to call a program by a particular name, say, square, it may be a good idea to use names
like sq1, sq2... for preliminary versions. When the program is in its final form take at least two copies
called square and the others may be deleted by re-formatting or by some more selective method.
SELF TEST ON CHAPTER 5
You can score a maximum of 14 points from the following test. . Check your score with the answers in
the "Answers To Self Tests" section at the end of this Beginner's Guide.
1. Why are lower case letters preferred for program words which you choose?
2. What is the purpose of indenting?
3. What should normally guide your choice of identifiers for variables and loops?
4. Name three ways of editing a program in the computer's main memory (three points).
5. What should you remember to type at the end of every command or program line when you enter
it?
6. What should you normally type before you enter a program at the keyboard?
7. What must be at the beginning of every line to be stored as part of a program?
8. What must you remember to type to make a program execute?
9. What keyword enables you to put into a program information which has no effect on the
execution?
10. Which two keywords help you to store programs on and retrieve from cartridges? (two points).

Advertisement

Table of Contents
loading

Table of Contents