11.13. Stop

| Chapter 11: Phrases |

| 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.

stop

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.

Previous | Contents | Next