| Chapter 17: Activities |

| 17.2. How activities work

All activities start, continue for a while and then finish: however, no activity ever runs on for more than a single turn. Several activities can be going on at the same time. For instance, suppose the following is printed as part of the description of a grocery:

> You can see a banana, an apple and a star-fruit here.

At the moment when Inform prints "apple", two activities are under way: "listing contents of the Grocery", and "printing the name of the apple". The sequence of events was in fact:

> say "You can see "
> start listing contents of the Grocery
> say "a "
> start printing the name of the banana
> say "banana"
> finish printing the name of the banana
> say ", an "
> start printing the name of the apple
> say "apple"
> finish printing the name of the apple
> say " and a "
> start printing the name of the star-fruit
> say "star-fruit"
> finish printing the name of the star-fruit
> finish listing contents of the Grocery
> say " here."

The golden rule is: if activity B starts during activity A, it must also finish during activity A.

Previous | Contents | Next