| Chapter 16: Understanding |

| 16.10. Understanding values

So far every "Understand" sentence has ended with "as" and a description of an action. But we can also use "Understand" to supply new ways to talk about things and even values. For instance, if we create:

> A brass lantern is in the Building.

then it can be called "brass", or "lantern", but not "lamp": Inform does not really know what these words mean, and has no grasp of synonyms. We can arrange for "lamp" to work as well like so:

> Understand "lamp" as the lantern.
> Understand "old lamp" as the lantern.

With care, we can do the same trick for entire kinds of thing at once. It is not ordinarily the case that a thing can be called by the name of its kind: if we put a woman called April into a room, then she can usually be called "April", but not "woman". (The exception is when we do not specify any name for her - in that case, Inform will give up and call her just "woman".) So there is not usually any form of words which can refer to anything of a given kind. If we should want this, we have to say so explicitly:

> Understand "machine" as a device.

Device is a kind, so now the word "machine" can be used to refer to any device: if there are two in the same place, the result might play out like so:

> >switch machine on
> Which do you mean, the bale twiner or the grain thresher?
> >twiner
> You watch absorbed as a perfect cube of hay is trussed up like a parcel.

Similarly, we might conceivably want to allow new ways to recognise values - in this case, a number:

> Understand "eleventy-one" as 111.

238
| Example Palette An artist's workshop in which the canvas can be painted in any colour, and where painterly names for pigments ("cerulean") are accepted alongside everyday ones ("blue").

There are hundreds of traditional pigments, from lampblack to burnt sienna, so we will confine ourselves to just two: "Palette" The Atelier is a room. "The floridly untidy loft space used by a moderately unsuccessful artist (you, that is)." The canvas, palette and paint brush are here. Understand "painting" as the canvas. Colour is a kind of value. The colours are white, red, blue and green. The canvas has a colour. The canvas is white. The printed name of the canvas is "largely [colour] canvas". Painting is an action applying to one thing and one colour. Check painting: if the noun is not the canvas then say "Centuries of tradition suggest that canvas is the natural home of paint." instead. Carry out painting: change the colour of the canvas to the colour understood. Report painting: say "You splash away at the now [canvas]." Understand "paint [something] [a colour]" as painting. Understand "calico" as white. Understand "cerulean" or "cerulean blue" as blue. Test me with "examine canvas / paint canvas red / examine canvas / paint canvas cerulean / examine canvas".

Previous | Contents | Next