ANSWERS TO SELF TEST ON CHAPTER 4
1. A character string is a sequence of characters such as letters, digits or other symbols.
2. The term, 'character string', is often abbreviated to 'string'.
3. A string variable name always ends with $.
4. Names such as word$ are sometimes pronounced 'worddollar'
5. The keyword LEN will find the length or number of characters in a string. For example, if the
variable meat$ has the value 'steak' then the statement:
PRINT LEN(meat$)
will output 5.
6. The symbol for joining two strings is &.
7. The limits of a string may be defined by quotes or apostrophes.
8. The quotes are not part of the actual string and are not stored.
9. The function is CHR$. You must use it with brackets as in CHR$(66) or with brackets as in
CHR$(RND(65 TO 67)).
10. You generate random letters with statements like:
lettercode = RND(65 TO 90)
PRINT CHR$(lettercode)
CHECK YOUR SCORE
9 or 10 is very good. Carry on reading.
7 or 8 is good but re-read some parts of chapter four
5 or 6 is fair but re-read some parts of chapter four and do the test again.
Under 5 You should work carefully through chapter four again and repeat the test.