Inform 7 Home Page / Documentation

§15.12. Making the verb "to weigh"

So now we can invent notations for weight. We could, for instance, write:

Weight is a kind of value. 1kg specifies a weight. Every thing has a weight.

And that allows us to write:

The lead pig is in the Salt Mine. The weight of the lead pig is 45kg.

But nobody would say it that way: they'd say "The lead pig weighs 45kg." So what we really need to complete our setup is a verb "to weigh".

We have already created new verbs, but none of those methods are quite convenient for this. We want to relate something tangible (the lead pig) to something intangible (45kg), and there's no convenient relation to express this; if we set it up as a condition, we'd get something we couldn't assert, only test. Instead, we'll do something different this time:

The verb to weigh means the weight property.

Previous definitions like this ended "means the ... relation", rather than "means the ... property", but the idea is the same. The meaning of "X weighs Y" is that the weight property of X is equal to Y. So we can now write:

A thing usually weighs 1kg. The lead pig weighs 45kg.
something weighing 20kg
if three things weigh 5kg, ...

And as we saw in the chapter on Descriptions, we can also set up adjectives, comparatives and superlatives:

Definition: A thing is heavy if its weight is 20kg or more.

which creates "heavy", "heavier" and "heaviest".

arrow-up.png Start of Chapter 15: Numbers and Equations
arrow-left.png Back to §15.11. Named notations
arrow-right.png Onward to §15.13. The Metric Units extension

This example draws together the previous snippets into a working implementation of the weighbridge.

***ExampleLead Cuts Paper
To give every container a breaking strain, that is, a maximum weight of contents which it can bear - so that to put the lead pig into a paper bag invites disaster.