| Chapter 5: Text |

| 5.6. Line breaks and paragraph breaks

Inform has an automatic mechanism which tries to ensure that paragraph breaks occur naturally when different rules produce text. Thus, if a rule says "Arnold suddenly rushed out of the room!", this will normally be set apart from the text preceding it by a paragraph break.

This mechanism is quite hard to fool, but not impossible. So saying "[line break]" forces a line break in the text, and "[paragraph break]" forces a paragraph break.

More subtly, saying "[run paragraph on]" effectively makes the next paragraph run straight on from the current one. And saying "[conditional paragraph break]" marks a place where Inform can put a paragraph break if it needs one. (This is sometimes useful when producing a large amount of text which changes with the circumstances so that it is hard to predict in advance whether a paragraph break is needed or not.)

There is just one other form of paragraph break, used only in special circumstances: printing clarificatory text after a command, when we are telling the player that we are making a guess at what was meant. For instance:

> (first opening the Wicket Gate)

Conventional spacing here is that text should immediately follow on the next line, unless we are going to a different room and looking around, in which case a line break should be added. We can get this spacing convention using the text substitution "[command clarification break]"; for instance:

> say "(first opening [the noun])[command clarification break]";

55
| Example Examining everything at once Making the SEARCH command examine all the scenery in the current location.

Previous | Contents | Next