Inform 7 Home Page / Documentation

§13.7. Relations in groups

Finally, there is a kind of relation which binds even more strongly.

Nationality relates people to each other in groups.

This is a kind of relation which divides people up: we might wish to have all the Icelandic people related to each other, all the Peruvians to each other, and so on. If there were a Pacific island called Informia with one inhabitant, then that person would be related only to himself. As time goes by, we could imagine people emigrating, and so on, so that these groupings would switch: perhaps everyone would leave Belgium and, for a while, there would be no Belgian nationals at all.

The testing command RELATIONS prints out the current state of all the relations created in the source code. For instance:

Overlooking relates various rooms to various rooms:
    The Pub >=> the Garden
    The Garden >=> the Shrubbery
    The Shrubbery >=> the Sundial Plot
Friendship relates people to each other:
    Mr Wickham <=> Sophie
    Charlotte <=> Sophie
Marriage relates one person to another:
    Mr Wickham == Sophie

That can produce a lot of output. To see only a single relation, or to see it at some intermediate point in a calculation, there's also a testing phrase:

show relation (relation of values to values)

This phrase is for testing purposes only. It shows the current state of the named relation, that is, it shows which values relate to which other ones, where it's possible to do this in any sensible way.

But this is a phrase - not a typed command.

arrow-up.png Start of Chapter 13: Relations
arrow-left.png Back to §13.6. Making reciprocal relations
arrow-right.png Onward to §13.8. The built-in verbs and their meanings

A machine that turns objects into other, similar objects.

A kind of rope which can be tied to objects and used to anchor the player or drag items from room to room.