Program Example 15 is also similar to a program we wrote in QBasic - the Sentence one. It counts the number of spaces to work out the number of words in a sentence. It also uses an array to keep track of how times each letter occurs in the sentence. New string functions are CHR and ASC.
Questions to answer:
- What is a pangram?
- What is ASCII?
- Explain what CHR and ASC do and give some examples.
- What is the significance of the ranges 65-90 and 97-122 in the comments of the blue-book-code?
- Explain what the AddToArray subroutine does from the time it is called until it ends. You may find it helpful to your understanding to sketch the Letters array.