Inform 7 Home Page / Documentation

§11.13. Stop

Now that it's possible to define phrases where different things are done in different circumstances, we sometimes want to halt early. This is what "stop" is for.


This phrase causes the current rule to end immediately. It is most often used in the definition of other phrases:

To judge the score:
    if the score is 0, stop;
    say "The score is [score in words] more than it was a half-hour ago."

In the case when the score is 0, the "stop" ends the phrase immediately, so that the subsequent text is printed only if the score is not 0.

"Stop" can also be used in action rules, though this is not very good style - it's clearer to use "stop the action", which is exactly equivalent.

arrow-up.png Start of Chapter 11: Phrases
arrow-left.png Back to §11.12. Next and break
arrow-right.png Onward to §11.14. Phrase options