Sinclair QL Beginner's Manual page 15

Hide thumbs Also See for QL:
Table of Contents

Advertisement

The symbols $, % have special purposes, to be explained later, but you can use the
underscore to make names such as:
dog_food
month_wage_total
more readable.
SuperBASIC does not distinguish between upper and lower case letters, so names like TINS
and tins are the same.
The maximum number of characters in a name is 255.
Names which are constructed according to these rules are called identifiers. Identifiers are used for
other purposes in SuperBASIC and you need to understand them. The rules allow great freedom in
choice of names so you can make your programs easier to understand. Names like total, count, pens
are more helpful than names like Z, P, Q.
SELF TEST ON CHAPTER 2
You can score a maximum of 21 points from this test Check your score with the answers in "Answers
To Self Test" section at the end of this Beginner's Guide.
1. How should you imagine an internal number store?
2. State two ways of storing a value in an internal 'pigeon hole' to be created (two points)
3. How can you find out the value of an internal 'pigeon hole'?
4. What is the usual technical name for a 'pigeon hole'?
5. When does a pigeon hole get its first value?
6. A variable is so called because its value can vary as a program is executed. What is the usual
way of causing such a change?
7. The = sign in a LET statement does not mean 'equals' as in mathematics. What does it mean?
8. What happens when you ENTER an unnumbered statement?
9. What happens when you ENTER a numbered statement?
10. What is the purpose of quotes in a PRINT statement?
11. What happens when you do not use quotes in a PRINT statement?
12. What does an INPUT statement do which a LET statement does not?
13. What type of program statement is never executed?
14. What is the purpose of a DATA statement?
15. What is another word for the name of a pigeon hole (or variable)?
16. Write down three valid identifiers which use letters, letters and digits, letters and underscore
(three points)
17. Why is the space bar especially important in SuperBASlC?

Advertisement

Table of Contents
loading

Table of Contents