Inform 7 Home Page / Documentation
§11.2. The phrasebook
The Phrasebook is Inform's collection of recognised phrases, and it can always be browsed using the Index panel of the same name. Even the smallest project has a good-sized phrasebook, since it contains all of the built-in phrases. But most projects also define new phrases of their own.
Here is a simple definition of a new phrase:
To spring the trap:
say "'Sproing!' go the hinges and, with a flash of silver, the enormous blades whisk together!";
end the story.
Inform allows us to use whatever conventions of layout we prefer, but it's customary to use indentation like this, dividing off the preamble from the phrases which follow. As can be seen, definitions of new phrases look very like rules.
What makes this definition a simple one is that the wording is fixed. The only way to use this would be from another phrase or rule, like so:
Instead of entering the cage:
spring the trap.
In the next section we'll see how to give more complicated definitions which, like "move ... to ...", allow for the wording to change with the circumstances.