1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-05 16:44:21 +03:00
inform7/resources/Documentation/Examples/RocketMan.txt
2019-03-16 13:12:11 +00:00

25 lines
1.4 KiB
Plaintext

* Upper and lower case letters
(Case change for text produced by to say phrases; Rocket Man)
Using case changes on any text produced by a "to say..." phrase.
We can now change the case of any text produced by a "to say..." phrase. This is often useful when we would like to make use of a standard say phrase in some new context. Say, for instance, that we would like to "[is-are the list...]" in a context that needs the first letter to be capitalized.
We could write a new say phrase, such as "to say is-are the list of (N - a description of objects) in sentence capitalization"; but there is an easier way, and that is to set a text variable to the output of the to say phrase, and then print that text in the case of our choice.
For example:
{*}"Rocket Man"
Instead of going somewhere from the spaceport when the player carries something:
let N be "[is-are the list of things carried by the player] really suitable gear to take to the moon?" in sentence case;
say "[N][paragraph break]".
The Spaceport is a room. North of the Spaceport is the Rocket Launch Pad. The player carries a stuffed bear, a chocolate cookie, and a book.
The description of the book is "It is entitled [italic type]Why Not To Take [sentence cased inventory] To The Moon[roman type]."
To say sentence cased inventory:
let N be "[a list of things carried by the player]" in title case;
say "[N]".
Test me with "n / x book".