| Chapter 15: Tables |

| 15.4. Changing entries

Here is another rather definitive, immutable-looking table:

> Table 4 - Recent Monarchs

> Name | Accession | Family
> "Anne" | 1702 | Stuart
> "George I" | 1714 | Hanover
> "George II" | 1720 | Hanover
> "George III" | 1760 | Hanover
> "George IV" | 1820 | Hanover
> "William IV" | 1830 | Hanover
> "Victoria" | 1837 | Hanover
> "Edward VII" | 1901 | Saxe-Coburg-Gotha
> "George V" | 1910 | Windsor
> "Edward VIII" | 1936 | Windsor
> "George VI" | 1936 | Windsor
> "Elizabeth II" | 1952 | Windsor

But table entries can be changed as freely as variables: that is, any value can be entered so long as it has the right kind. We cannot put a dynasty into the "Name" column, or text in the "Accession" column. The phrase needed is "change ... to ...", just as it is for properties or variables:

> Dynasty is a kind of value. The dynasties are Stuart, Hanover, Saxe-Coburg-Gotha and Windsor.

> The Succession is in the Table Office. "But the Succession, a ponderous list of English monarchs, takes pride of place."

> Instead of examining the Succession: say "The Succession List runs as follows..."; repeat with N running from 1 to the number of rows in the Table of Recent Monarchs begin; say "[accession in row N of Table 4]: [name in row N of Table 4] ([family in row N of Table 4])."; end repeat.

> Instead of attacking the Succession: change (the family corresponding to an accession of 1720 in the Table of Recent Monarchs) to Stuart; change the name in row 4 of the Table of Recent Monarchs to "Graham I"; change the name in row 5 of the Table of Recent Monarchs to "Trixibelle IV"; say "You deface the English succession, making suitable amendments with a quill pen. Considering it is supposed to be mightier than the sword the effect is a little disappointing."

Previous | Contents | Next