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.


232
 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").


PreviousContentsNext