Here are some revision questions, answered earlier in this chapter.
1. What is a programming language?
2. What is declarative programming?
3. What are expressions?
4. What are imperatives?
5. What are declarations? What are initalised declarations?
6. Give examples of some of the sorts of objects Pop-11 expressions can refer to.
7. Give examples of some of the sorts of imperatives one can construct in Pop-11 and explain what they do.
8. Give an example of a Pop-11 procedure, and explain how it is used and what it does.
9. Define a procedure which takes in three numbers, adds up the first two, and then multiplies the result by the third. Your definition could start:
define addmult(x, y, z) -> result;What is the difference between defining a procedure and calling, running, or invoking it?
11. Explain with examples what it means to say that a procedure takes a certain number of arguments, and does or does not produce a result.
12. What is the difference between printing something out and producing a result?
13. What is the difference between `=>' and `==>' ?
14. What is a comment, and how are comments expressed in Pop-11?
15. What will the following print:
pr(99);spr(100);pr(101);spr(102);spr(103);npr(66);pr(77);What are predicates and how are they used in conditions?
17. Which of the following words are legal in Pop-11?
"cat5" "5cat" "**+**" "*cat*" "_5cat" "*_cat"You can test each case by typing it in followed by "=>" to see if you get an error.
18. What are compile time processes and run time processes?