| Chapter 5: Text |

| 5.3. Text with numbers

When a numerical value is given in a square-bracketed substitution, it is ordinarily printed out in digits. Thus:

> "You've been wandering around for [turn count] turns now."

might print as "You've been wandering around for 213 turns now.", if the game has been played out for exactly that many commands. Alternatively, we can add "...in words", thus:

> "You've been wandering around for [turn count in words] turns now."

to get the more conversational "You've been wandering around for two hundred and thirteen turns now."

Either way, though, there is some risk of the following:

> You've been wandering around for one turns now.

We can avoid this using the special substitution "[s]", which prints a letter "s" unless the last number printed was 1. So:

> "You've been wandering around for [turn count in words] turn[s] now."

will produce "... for one turn now." or "... for two turns now." as appropriate. This only solves one case (what about all the other plural endings, from "women" to "cherubim"?), and as we shall see we can get the same effect and very much more using the methods in the next section, so "[s]" is something of an anomaly. But it's memorable, and even if it only solves one small need, this is a need which turns up often.

49
| Example Ballpark A new "to say" definition which allows the author to say "[a number in round numbers]" and get verbal descriptions like "a couple of" or "a few" as a result.

Previous | Contents | Next