Inform 7 Home Page / Documentation


§18.12. Printing a number of something

1. When it happens. Only when a group of identical items is present in the same place, and are being described jointly with text like "You can see five gold rings here." The activity prints the "five gold rings" part. The variable "listing group size" contains the number, which in this example would be 5, and is always at least 2.

2. The default behaviour. The number of items is printed, in words ("five") and then the "printing the plural name" activity is run ("gold rings").

3. Examples. (a) Using this activity is for perfectionists, because the normal behaviour is almost always fine. Still:

paste.png Rule for printing a number of blocks when the listing group size is 3: say "all three blocks".

(b) Or perhaps:

paste.png Rule for printing a number of ants: say "altogether [listing group size in words] ants".

(c) If the only part needing variation is the plural name, it's simpler and tidier to use the "printing the plural name of something" activity instead.


arrow-up.png Start of Chapter 18: Activities
arrow-left.png Back to §18.11. Printing the plural name of something
arrow-right.png Onward to §18.13. Listing contents of something

*ExampleProlegomena
Replacing precise numbers with "some" or other quantifiers when too many objects are clustered together for the player to count at a glance.