| Chapter 18: Rulebooks |

| 18.11. Outcome values

We have now seen two ways to write the outcome of a rule: as simple success or failure, with more or less explicit phrases like:

> rule succeeds;
> rule fails;
> continue the action;
> stop the action;

and by using a named outcome for the current rulebook as if it were a phrase, as in:

> low background noise;

There is still a third way: we can stop a rule and at the same time supply a value. This means that rulebooks can be used to calculate quantities, as well as taking yes/no decisions, or simply carrying out activities. The following phrases work in any rulebook:

> rule succeeds with result (...)
> rule fails with result (...)

The result can be a room, a thing or a text. It can be referred to as

> the result of the rule

which is nothing if the rule ended without success or failure.

Thus, "the result of the rule" will refer to the result of whatever rule or rulebook we last consulted. Similarly, "if rule succeeded" and "if rule failed" will tell us how the last-consulted rule or rulebook ended.

(This is in fact what is happening in our "audibility rules" example: writing "low background noise" is exactly equivalent to writing

> rule succeeds with result the low background noise outcome;

but is evidently more concise and easier to remember. The values "the result of the rule" and "the outcome of the rulebook" are actually the same, because the result of following a rulebook is the result of the rule which stops it.)

Previous | Contents | Next