| Chapter 5: Text |

| 5.4. Text with lists

The useful substitution "[list of description]" prints out, as an English sentence, a list of all the objects which match the given description. For instance,

> "The places you can go are [list of rooms]."

Any description can be given and, as we shall see, descriptions can be very flexible indeed:

> "Mr Darcy glares proudly at you. He is wearing [list of things worn by Darcy] and carrying [list of things carried by Darcy]."

And, if this were from a dramatisation of the novel by Miss Fielding rather than Miss Austen, we might find:

> Mr Darcy glares proudly at you. He is wearing a pair of Newcastle United boxer shorts and carrying a self-help book.

If the description matches nothing - for instance, if Darcy has empty hands - then "nothing" is printed. A more insidious problem is that the list may end up either singular or plural. We might be expecting that the example above will produce something like:

> The places you can go are Old Bailey, Bridget's Flat and TV Centre.

But if there is only one room, then the result would be:

> The places you can go are Bridget's Flat.

which is wrong. We can get around this with careful wording and a slightly different substitution:

> "Near here [is/are list of rooms]."

which uses "is" or "are" as appropriate. Lastly, we can also make the items listed take the definite article by writing:

> "Mr Darcy impatiently bundles [the list of things carried by Darcy] into your hands and stomps out of the room."

which might result in

> Mr Darcy impatiently bundles the self-help book and the Christmas card into your hands and stomps out of the room.

50
| Example Control Center Objects which automatically include a description of their component parts whenever they are examined.

It is straightforward to make a rule that anything with parts must mention all those parts during an EXAMINE command: "Control Center" After examining a thing when something is part of the noun: say "[The noun] includes [a list of things which are part of the noun]." The Control Center is a room. "Here you are at the Control Center of the universe." The Universe Management Computer is a fixed in place thing in the Control Center. "The Universe Management Computer sits directly before you, unguarded." The description of the Universe Management Computer is "The computer is so large that you would be unable to operate it all from one position. Alas, it does not come with a manual." A chartreuse indicator light, an ennui meter, a golden knob settable to 15,000 positions, a toothpick dispensor, and a button labeled RESTART are part of the Universe Management Computer. The command chair is an enterable supporter in the Control Center. It is pushable between rooms. "Because the computer is too large for you to reach all of the front panel from a standing position, there is a command chair on casters which allows you to push back and forth." The description of the command chair is "Quite ordinary, really, but for the heady rush of power that comes of sitting in it.". Some casters are part of the command chair. Now whenever we look at any object with components, we will first see the description, then a list of parts which belong to it. The following refinement brings in elements of later chapters, but it may be worth noting: because we've written our rule as an "After examining...", anything that pre-empts the operation of the examine command will also prevent that rule from occurring. So for instance: A hair-thick needle is part of the ennui meter. Instead of examining the ennui meter: say "You can't be bothered." ...would not result in the needle being mentioned. Test me with "x chair / x computer / x ennui meter"

51
| Example Tiny Garden A lawn made up of several rooms, with part of the description written automatically.

Previous | Contents | Next