Inform 7 Home Page / Documentation
Chapter 6: Descriptions
§6.1. What are descriptions?; §6.2. Adjectives and nouns; §6.3. Sources of adjectives; §6.4. Defining new adjectives; §6.5. Defining adjectives for values; §6.6. Whereabouts on a scale?; §6.7. Comparatives; §6.8. Superlatives; §6.9. Which and who; §6.10. Existence and there; §6.11. A word about in; §6.12. A word about nothing; §6.13. To be able to see and touch; §6.14. Adjacent rooms and routes through the map; §6.15. All, each and every; §6.16. Counting while comparing
|Contents of Writing with Inform|
|Chapter 5: Text|
|Chapter 7: Basic Actions|
|Indexes of the examples|
§6.1. What are descriptions?
It is in describing circumstances that Inform really capitalises on the concise, expressive power of natural language, and this chapter brings together the facts about "descriptions".
The simplest descriptions consist of a noun alone. Some refer to single things ("lantern", or "wine cask"), others to kinds of thing ("dead end" or "container"). But we have also seen adjectives alone:
The oaken desk is fixed in place.
Here, "fixed in place" is a description which, to Inform's simple-minded grammar, is a single adjective. And of course adjectives and nouns can be combined:
The cargo trunk is an openable container.
The description "openable container" consists of the noun "container", meaning a kind of thing, and the adjective "openable", which means one of the two possible states of an either/or property held by that thing.
As the next chapter will show, rules also make great use of descriptions:
Instead of throwing something at a closed openable door, say "Or you could just use the handle like anyone else, of course."
We have already seen that we can list the items fitting a given description:
"You look down at [the list of things in the basket]."
It's also sometimes convenient to count them up:
number of (description of values) ... number
This phrase counts the number of values matching the description, which may of course be 0. Example:
produces the number of doors, anywhere in the model world, which are currently open. A Problem message is produced if the number is potentially infinite, or impractical to count: for instance, Inform rejects "number of odd numbers".
It is because descriptions are so widely useful that they deserve a chapter of their own, and this is it.