Inform 7 Home Page / Documentation
§18.4. While clauses
Rules applied to actions can become baroque ("after going through a door in the presence of an animal when -" and so on and so forth), but activities are again simpler: they only have one possible clause attached, which is called "while". For instance, the following would provide a fairly sledgehammer hint that the sack should not lightly be thrown away:
The sack is a player's holdall. The sack is carried. Rule for printing the name of the sack while the sack is not carried: say "your abandoned sack".
Any condition can be given after the "while", and we can also specify that another activity has to be going on. Thus:
Rule for printing the name of the lemon sherbet while listing contents: say "curious sort of lemon sherbet sweet".
This nicely distinguishes between contexts where it's appropriate to be more verbose, and where it isn't. Thus:
You can see a teaspoon and a curious sort of lemon sherbet sweet here.
> TAKE ALL
teaspoon: Taken.
lemon sherbet: Taken.