| Ph 1 Phrases | Lx 2 Lexicon | Rl 3 Relations | Vb 4 Verbs | Phrasebook Index A short dictionary

Ph 1 | Phrases — A guide to the phrases allowed About phrases

Saying

Values , Names with articles , Say if and otherwise , Say one of , Paragraph control , Special characters , Fonts and visual effects , Some built-in texts , Saying lists of things , Group in and omit from lists , Lists of values , Responses

Values

Making conditions true , Giving values temporary names , Arithmetic , Real Arithmetic , Trigonometry , Hyperbolic functions , Enumerations , Truth states , Randomness , Tables , Sorting tables , Breaking down text , Matching text , Replacing text , Casing of text , Adaptive text , Lists , Length of lists , Reversing and rotating lists , Sorting lists , Relations , Functional programming , Files , Figures , Sound effects

Control phrases

If and unless , While , Repeat , Changing the flow of loops , Deciding outcomes , Stop or go

Actions, activities and rules

Trying actions , Action requirements , Stop or continue , Actions as values , Carrying out activities , Advanced activities , Following rules , Success and failure

Model world

Ending the story , Times of day , Durations , Timed events , Scenes , Timing of scenes , Player's identity and location , Moving and removing things , The map , Route-finding , The object tree

Understanding

Asking yes/no questions , The player's command , Changing the player's command , Scope and pronouns

From the extension English Language by Graham Nelson

Section 1 - Grammatical definitions , Section 2 - Saying pronouns , Section 3 - Further pronouns

Saying

Values

say "sayable value"

say "sayable value"

This text substitution takes the value and produces a textual representation of it. Most kinds of value, and really all of the useful ones, are "sayable" - numbers, times, objects, rules, scenes, and so on. Example:

> The description of the wrist watch is "The dial reads [time of day]."

Here "time of day" is a value - it's a time that varies, and time is a sayable kind of value, so we might get "The dial reads 11:03 AM."

See 5.3. 5.3. Text which names things

say "[number in words]"

say "[number in words]"

This text substitution writes out the number in English text. Example:

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

might produce "You've been wandering around for two hundred and thirteen turns now." The "and" here is natural on one side of the Atlantic but not the other - so with the "Use American dialect." option in place, it disappears.

See 5.4. 5.4. Text with numbers

say "[time in words]"

say "[time in words]"

This text substitution produces the given time written out in English sentence form. For example:

> "Through the glass you can see the reversed hands reading [the time of day in words]."

might produce

> Through the glass you can see the reversed hands reading twenty to nine.

See 9.7. 9.7. Telling the time

say "[s]"

say "[s]"

This text substitution prints a letter "s" unless the last number printed was 1. Example:

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

produces "... for one turn now." or "... for two turns now." as appropriate. Note that it reacts only to numbers, not to other arithmetic values like times (or, for instance, weights from the "Metric Units" extension).

See 5.4. 5.4. Text with numbers

Names with articles

say "[a object]"

say "[an object]"

say "[A object]"

say "[An object]"

say "[a object]"

This text substitution produces the name of the object along with its indefinite article. Example:

> Instead of examining something (called the whatever):
> "You can only just make out [a whatever]."

which might produce "You can only just make out a lamp-post.", or "You can only just make out Trevor.", or "You can only just make out some soldiers." The "a" or "an" in the wording is replaced by whatever indefinite article applies, if any.

See 5.3. 5.3. Text which names things

say "[the object]"

say "[The object]"

say "[the object]"

This text substitution produces the name of the object along with its definite article. Example:

> Instead of examining something (called the whatever):
> "You can only just make out [the whatever]."

which might produce "You can only just make out the lamp-post.", or "You can only just make out Trevor.", or "You can only just make out the soldiers." The "the" in the wording is replaced by whatever definite article applies, if any.

See 5.3. 5.3. Text which names things

Say if and otherwise

say "[if a condition]"

say "[if a condition]"

This text substitution produces no text. It's used only for a side-effect: it says that the text following should be said only if the condition is true. That continues until the end of the text, or until an "[end if]" substitution, whichever comes first. If the "[otherwise]" and "[otherwise if]" substitutions are also present, they allow alternatives to be added in case the condition is false. Example:

> The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise]sealed wine cask".

we find that the cask is described as "a broached, empty cask" when open, and "a sealed wine cask" when closed. A longer example which begins and ends with fixed text, but has two alternatives in the middle:

> The Customs Wharf is a room. "Amid the bustle of the quayside, [if the cask is open]many eyes stray to your broached cask. [otherwise]nobody takes much notice of a man heaving a cask about. [end if]Sleek gondolas jostle at the plank pier."

See 5.6. 5.6. Text with variations

say "[unless a condition]"

say "[unless a condition]"

This text substitution produces no text. It's used only for a side-effect: it says that the text following should be said only if the condition is false. That continues until the end of the text, or until an "[end if]" substitution, whichever comes first. If the "[otherwise]" and "[otherwise if]" substitutions are also present, they allow alternatives to be added in case the condition is true. Example:

> The Customs Hall is a room. "With infinite slowness, with ledgers and quill pens, the clerks ruin their eyesight.[unless the player is a woman] They barely even glance in your direction."

See 5.6. 5.6. Text with variations

say "[otherwise/else if a condition]"

say "[otherwise/else if a condition]"

This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It gives an alternative text to use if the first condition didn't apply, but this one does. Example:

> The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise if transparent]sealed cask half-full of sloshing wine[otherwise]sealed wine cask".

See 5.6. 5.6. Text with variations

say "[otherwise/else unless a condition]"

| say "[otherwise/else unless a condition]" This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It gives an alternative text to use if the first condition didn't apply, and this one is false too. See 5.6. 5.6. Text with variations |

say "[otherwise]"

say "[else]"

say "[otherwise]"

This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It switches from text which appears if the condition is true, to text which appears if it is false. Example:

> The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise]sealed wine cask".

See 5.6. 5.6. Text with variations

say "[end if]"

| say "[end if]" This text substitution produces no text, and can be used only to close off a stretch of varying text which begins with "[if ...]". See 5.6. 5.6. Text with variations |

say "[end unless]"

| say "[end unless]" This text substitution produces no text, and can be used only to close off a stretch of varying text which begins with "[unless ...]". See 5.6. 5.6. Text with variations |

Say one of

say "[one of]"

say "[one of]"

This text substitution produces no text. It's used only for a side-effect: it switches between a number of alternative texts, which follow it and are divided by "[or]" substitutions, according to a strategy given in a closing substitution. Example:

> "You flip the coin. [one of]Heads[or]Tails[purely at random]!"

Here there are just two alternatives, and the strategy is "purely at random". Exactly half of the time the text will be printed as "You flip the coin. Heads!"; and the other half, "You flip the coin. Tails!".

See 5.7. 5.7. Text with random alternatives

say "[or]"

say "[or]"

This text substitution produces no text, and can be used only in a "[one of]..." construction. It divides alternative wordings. Example:

> "You flip the coin. [one of]Heads[or]Tails[purely at random]!"

See 5.7. 5.7. Text with random alternatives

say "[at random]"

say "[at random]"

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen at random except that the same choice cannot come up twice running. This is useful to avoid the deadening effect of repeating the exact same message. Example:

> "The light changes randomly again; now it's [one of]green[or]amber[or]red[at random]."

Here we can safely say the light "changes", because the new colour cannot be the same as the one printed the last time.

See 5.7. 5.7. Text with random alternatives

say "[purely at random]"

| say "[purely at random]" This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen uniformly randomly. See 5.7. 5.7. Text with random alternatives |

say "[then at random]"

say "[then at random]"

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen in sequence until all have been seen, and then after that, at random except that the same choice cannot come up twice running. Example:

> "Maybe the murderer is [one of]Colonel Mustard[or]Professor Plum[or]Cardinal Cerise[then at random]."

See 5.7. 5.7. Text with random alternatives

say "[then purely at random]"

| say "[then purely at random]" This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen in sequence until all have been seen, but that after that they are chosen uniformly randomly. See 5.7. 5.7. Text with random alternatives |

say "[sticky random]"

say "[sticky random]"

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that a random choice is made the first time the text is printed, but that it sticks from there on. Example:

> "The newspaper headline is: [one of]War Casualties[or]Terrorists[or]Banks[sticky random] [one of]Continue To Expand[or]Lose Out[sticky random]."

Although the newspaper headline will change with each playing, it will not alter during play.

See 5.7. 5.7. Text with random alternatives

say "[as decreasingly likely outcomes]"

say "[as decreasingly likely outcomes]"

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen at random, except that the first is most likely to be chosen, the second is next most likely, and so on down to the rarest at the end. Example:

> "Zorro strides by, [one of]looking purposeful[or]grim-faced[or]deep in thought[or]suppressing a yawn[or]scratching his ribs[or]trying to conceal that he has cut himself shaving[as decreasingly likely outcomes]."

There are six outcomes here: the first is six times as likely as the last, and those in between are similarly scaled, so Zorro cuts himself shaving only once in 21 tries, while he looks purposeful almost a third of the time.

See 5.7. 5.7. Text with random alternatives

say "[in random order]"

say "[in random order]"

This text substitution produces no text, and can be used only to end a "[one of]..." construction. A random order is chosen for the alternative passages of text, and they are used in that order as the text is printed again and again. When one random cycle finishes, a new one begins. The effect is somewhat like the "shuffle album" feature on an iPod. Example:

> "You dip into the chapter on [one of]freshwater fish[or]hairless mammals[or]extinct birds[or]amphibians such as the black salamander[in random order]."

One small restriction: if there are more than 32 variations, purely random choices will be printed, and there will be no guarantee that repeats are prevented.

See 5.7. 5.7. Text with random alternatives

say "[cycling]"

say "[cycling]"

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are used one at a time, in turn: after the last one is reached, we start again from the first. Example:

> "The pundits discuss [one of]the weather[or]world events[or]celebrity gossip[cycling]."

See 5.7. 5.7. Text with random alternatives

say "[stopping]"

say "[stopping]"

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are used one at a time, in turn: once the last one is reached, it's used forever after. Example:

> "[one of]The phone rings[or]The phone rings a second time[or]The phone rings again[stopping]."

See 5.7. 5.7. Text with random alternatives

say "[first time]"

say "[only]"

say "[first time]"

This pair of text substitutions causes whatever is between them to be printed only the first time the text is printed. Example:

> "The screen door squeaks loudly as when you open it. [first time]Well, you'll get used to it eventually. [only]"

This is exactly equivalent to

> "The screen door squeaks loudly as when you open it. [one of]Well, you'll get used to it eventually. [or][stopping]";

but easier to read.

See 5.7. 5.7. Text with random alternatives

Paragraph control

say "[line break]"

say "[line break]"

This text substitution produces a line break. Example:

> "There is an endless sense of[line break]falling and[line break]falling."

Line breaks are not paragraph breaks, so the result is:

> There is an endless sense of
> falling and
> falling.

with no extra vertical spacing between these lines.

See 5.8. 5.8. Line breaks and paragraph breaks

say "[no line break]"

say "[no line break]"

This text substitution produces no text. It's used only for a side-effect: it prevents a line break where Inform might otherwise assume one. Example:

> "The chorus sing [one of]Jerusalem[or]Rule, Britannia![no line break][at random]."

Here the "[no line break]" stops Inform from thinking that the exclamation mark means a sentence ending - it's part of the name of the song "Rule, Britannia!". So we get

> The chorus sing Rule, Britannia!.

with no line break between the "!" and ".".

See 5.8. 5.8. Line breaks and paragraph breaks

say "[conditional paragraph break]"

say "[conditional paragraph break]"

This text substitution either produces a paragraph break, or no text at all. It marks a place where Inform can put a paragraph break if necessary; in effect it simulates what Inform does every time a "before" or similar rule finishes. If there is text already printed, and text then follows on, a paragraph break is made. But if not, nothing is done. 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.

See 5.8. 5.8. Line breaks and paragraph breaks

say "[command clarification break]"

say "[command clarification break]"

This text substitution produces a line break, and then also a paragraph break if the text immediately following is a room description brought about by having gone to to a different room and looking around, in which case a line break should be added. In traditional IF, this is used when clarifying what Inform thinks the player intended by a given command. Example:

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

might result in

> (first opening the valise)
> You rummage through the valise for tickets, but find nothing.

See 5.8. 5.8. Line breaks and paragraph breaks

say "[paragraph break]"

say "[paragraph break]"

This text substitution produces a paragraph break. Example:

> "This is not right.[paragraph break]No, something is terribly wrong."

Paragraph breaks have a little vertical spacing in them, unlike mere line breaks, so the result is:

> This is not right.

> No, something is terribly wrong.

See 5.8. 5.8. Line breaks and paragraph breaks

say "[run paragraph on]"

say "[run paragraph on]"

This text substitution produces no text. It's used only for a side-effect: it prevents a paragraph break occurring after the present text is printed, in case Inform might be tempted to place one there. Example:

> Before taking something, say "Very well. [run paragraph on]".

This allows the reply to, say, TAKE ENVELOPE to be

> Very well. Taken.

rather than

> Very well.

> Taken.

which is how texts produced by different rules would normally be shown. (It's a traditional printer's term. See Oldfield's Manual of Typography, 1892, under "When two paragraphs are required to be made into one, or, in technical language, 'to run on'.")

See 5.8. 5.8. Line breaks and paragraph breaks

say "[run paragraph on with special look spacing]"

say "[run paragraph on with special look spacing]"

This text substitution produces no text. It's used only for a side-effect: it indicates that the current printing position does not follow a skipped line, and that further material is expected which will run on from the previous paragraph, but that if no further material turns up then a skipped line would be needed before the next command prompt. (It's very likely that only the Standard Rules will ever need this.)

See 5.8. 5.8. Line breaks and paragraph breaks

if a paragraph break is pending:

| if a paragraph break is pending: This condition is true if text has recently been said in such a way that Inform expects to add a paragraph break at the next opportunity (for instance when the present rule ends and another one says something, or when a "[conditional paragraph break]" is made). See 5.8. 5.8. Line breaks and paragraph breaks Kind: phrase nothing -> truth state |

Special characters

say "[bracket]"

say "[bracket]"

This text substitution expands to a single open square bracket, avoiding the problem that a literal [ in text would look to Inform like the opening of a substitution. Example:

> "He [bracket]Lord Astor[close bracket] would, wouldn't he?"

prints as "He [Lord Astor] would, wouldn't he?".

See 5.2. 5.2. How Inform reads quoted text

say "[close bracket]"

say "[close bracket]"

This text substitution expands to a single close square bracket, avoiding the problem that a literal ] in text would look to Inform like the closing of a substitution. Example:

> "He [bracket]Lord Astor[close bracket] would, wouldn't he?"

prints as "He [Lord Astor] would, wouldn't he?".

See 5.2. 5.2. How Inform reads quoted text

say "[apostrophe/']"

say "[apostrophe/']"

This text substitution expands to a single quotation mark, avoiding Inform's ordinary rule of converting literal single quotation marks to double at the edges of words. Example:

> Instead of going outside, say "Lucy snaps, 'What's the matter? You don't trust my cookin[apostrophe] mister?'"

produces:

> Lucy snaps, "What's the matter? You don't trust my cookin' mister?"

A more abbreviated form would be:

> Instead of going outside, say "Lucy snaps, 'What's the matter? You don't trust my cookin['] mister?'"

which has exactly the same meaning.

See 5.2. 5.2. How Inform reads quoted text

say "[quotation mark]"

say "[quotation mark]"

This text substitution expands to a double quotation mark. Most of the time this is unnecessary because of Inform's rule of converting literal single quotation marks to double at the edges of words, so it's needed only if we want a double-quote in the middle of a word for some reason. Example:

> "The compass reads 41o21'23[quotation mark]E."

which produces: The compass reads 41o21'23"E. (Note that ["] is not allowed; a double-quotation mark is never allowed inside double-quoted text, not even in a text substitution.)

See 5.2. 5.2. How Inform reads quoted text

Fonts and visual effects

say "[bold type]"

say "[bold type]"

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear in bold face. "[roman type]" should be used to switch back to normal. Example:

> "Jane looked down. [bold type]Danger[roman type], the sign read."

See 5.9. 5.9. Text with type styles

say "[italic type]"

say "[italic type]"

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear in italics. "[roman type]" should be used to switch back to normal. Example:

> "This is [italic type]very suspicious[roman type], said Peter."

See 5.9. 5.9. Text with type styles

say "[roman type]"

| say "[roman type]" This text substitution produces no text. It's used only for a side-effect: to return to ordinary Roman type after a previous use of "[bold type]" or "[italic type]". See 5.9. 5.9. Text with type styles |

say "[fixed letter spacing]"

say "[fixed letter spacing]"

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear with fixed letter spacing. In variable letter spacing, a lower case "m" is much wider than an "l", which is natural to the eye since it has been printing practice since the Renaissance. Fixed letter spacing is more like typewriting, and it is best used to reproduce typewritten text or printed notices; it can also be convenient for making simple diagrams. Example:

> "On the door is written: [fixed letter spacing]J45--O-O-O[variable letter spacing]."

See 5.9. 5.9. Text with type styles

say "[variable letter spacing]"

| say "[variable letter spacing]" This text substitution produces no text. It's used only for a side-effect: to return to ordinary letter spacing after a previous use of "[fixed letter spacing]". See 5.9. 5.9. Text with type styles |

display the boxed quotation (text)

display the boxed quotation (text)

This phrase displays the given text on screen in an overlaid box. For reasons to do with the way such quotations are plotted onto the screen, their text is treated literally: no substitutions in square brackets are obeyed. The quotation will only ever appear once, regardless of the number of times the "display the boxed quotation ..." phrase is reached. Rather than being shown immediately - and thus, probably, scrolling away before it can be seen - the display is held back until the next command prompt is shown to the player. Example:

> After looking in the Wabe, display the boxed quotation
> "And 'the wabe' is the grass-plot round
> a sun-dial, I suppose? said Alice,
> surprised at her own ingenuity.

> Of course it is. It's called 'wabe,'
> you know, because it goes a long way
> before it, and a long way behind it --

> -- Lewis Carroll".

This was the original example used in Trinity, by Brian Moriarty, which invented the idea. A player exploring Kensington Gardens comes upon a location enigmatically called The Wabe; and by way of explanation, this quotation pops up.

See 5.12. 5.12. Displaying quotations

Kind: phrase text -> nothing

Some built-in texts

say "[the/-- banner text]"

| say "[the/-- banner text]" This text substitution expands to the banner text giving bibliographic details of the current story file, rather like the opening credits of a movie, or the title page of a book. See 18.37. 18.37. Printing the banner text |

say "[the/-- list of extension credits]"

say "[the/-- list of extension credits]"

This text substitution expands to one or more lines of text crediting each of the extensions used by the current source text, along with their version numbers and authors. Extensions whose authors have chosen the "use authorial modesty" option are missed out. Example:

> Standard Rules version 2/090402 by Graham Nelson

See 27.6. 27.6. Version numbering

say "[the/-- complete list of extension credits]"

say "[the/-- complete list of extension credits]"

This text substitution expands to one or more lines of text crediting each of the extensions used by the current source text, along with their version numbers and authors. Every extension is included, even those whose authors have opted for "use authorial modesty". Example:

> Standard Rules version 2/090402 by Graham Nelson
> Locksmith version 9 by Emily Short

See 27.6. 27.6. Version numbering

say "[the/-- player's surroundings]"

say "[the/-- player's surroundings]"

This text substitution produces a succinct description of where the player is, be this in darkness, in a lighted room or inside an opaque container such as a large packing case. Example:

> now the left hand status line is "You: [the player's surroundings]";

See 8.3. 8.3. Changing the status line

Saying lists of things

list the contents of (object)

list the contents of (object)
optionally with newlines,
indented,
giving inventory information,
as a sentence,
including contents,
including all contents,
tersely,
giving brief inventory information,
using the definite article,
listing marked items only,
prefacing with is/are,
not listing concealed items,
suppressing all articles,
with extra indentation,
and/or capitalized

This phrase produces a list of all things whose holder is the given object, according to Inform's traditional conventions for room descriptions and inventory listings. Example:

> list the contents of Marley Wood, as a sentence, with newlines
> and including all contents;

Where this is possible, it's generally better to use "[list of things in ...]" instead, which produces the same result in an acceptable way for the middle of a sentence.

See 11.14. 11.14. Phrase options

Kind: phrase object -> nothing

say "[a list of description of objects]"

say "[A list of description of objects]"

say "[a list of description of objects]"

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its indefinite article. Example:

> a maritime bill of lading, some hemp rope and Falconer's Naval Dictionary

See 5.5. 5.5. Text with lists

say "[list of description of objects]"

say "[list of description of objects]"

This text substitution produces a list, in sentence form, of everything matching the description. Example:

> "Mr Darcy glares proudly at you. He is wearing [list of things worn by Darcy] and carrying [list of things carried by Darcy]."

And, if this were from a dramatisation of the novel by Miss Fielding rather than Miss Austen, we might find:

> Mr Darcy glares proudly at you. He is wearing a pair of Newcastle United boxer shorts and carrying a self-help book.

If the description matches nothing - for instance, if Darcy has empty hands - then "nothing" is printed.

See 5.5. 5.5. Text with lists

say "[the list of description of objects]"

say "[The list of description of objects]"

say "[the list of description of objects]"

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its definite article. Example:

> the maritime bill of lading, the hemp rope and Falconer's Naval Dictionary

See 5.5. 5.5. Text with lists

say "[is-are a list of description of objects]"

say "[is-are a list of description of objects]"

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its indefinite article, and the whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

> is a marlin-spike
> are a maritime bill of lading, some hemp rope and Falconer's Naval Dictionary

See 5.5. 5.5. Text with lists

say "[is-are list of description of objects]"

say "[is-are list of description of objects]"

This text substitution produces a list, in sentence form, of everything matching the description. The whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

> is marlin-spike
> are maritime bill of lading, hemp rope and Falconer's Naval Dictionary

See 5.5. 5.5. Text with lists

say "[is-are the list of description of objects]"

say "[is-are the list of description of objects]"

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its definite article, and the whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

> is the marlin-spike
> are the maritime bill of lading, the hemp rope and Falconer's Naval Dictionary

See 5.5. 5.5. Text with lists

say "[a list of description of objects including contents]"

| say "[a list of description of objects including contents]" This text substitution produces a list, in sentence form, of everything matching the description, noting any contents in brackets. This is really intended only to be used by the Standard Rules. See 5.5. 5.5. Text with lists |

Group in and omit from lists

group (description of objects) together

group (description of objects) together

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

> Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together.

This might produce the list item "fork and spoon".

See 18.13. 18.13. Listing contents of something

Kind: phrase description of objects -> nothing

group (description of objects) together giving articles

group (description of objects) together giving articles

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description, but giving each individual item its indefinite article. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

> Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together giving articles.

This might produce the list item "a fork and a spoon".

See 18.13. 18.13. Listing contents of something

Kind: phrase description of objects -> nothing

group (description of objects) together as (text)

group (description of objects) together as (text)

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description, summarised with the given text. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

> Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together as "utensils".

This might produce the list item "two utensils (fork and spoon)".

See 18.13. 18.13. Listing contents of something

Kind: phrase (description of objects, text) -> nothing

omit contents in listing

omit contents in listing

This phrase changes the form of an inventory listing, room description, etc., so that it will simply list "a bottle of sand" or "an empty bottle", rather than "a bottle (in which is sand)" or "a bottle (which is empty)". It should be used only when the listing is imminent, and does not have permanent effect.

See 18.10. 18.10. Printing the name of something

Kind: phrase nothing -> nothing

Lists of values

say "[list of values in brace notation]"

say "[list of values in brace notation]"

This text substitution produces the list in the form of "{", then a comma-separated list, and then "}", which looks less like an English sentence but more mathematical. Example:

> "[list of people in brace notation]"

might produce "{ yourself, Mr Darcy, Flashman }".

See 21.3. 21.3. Saying lists of values

say "[list of objects with definite articles]"

say "[list of objects with definite articles]"

This text substitution writes out the list in sentence form, adding the appropriate definite articles. Example:

> let L be {the piano, the music stand};
> say "[L with definite articles]";

says "the piano and the music stand".

See 21.3. 21.3. Saying lists of values

say "[list of objects with indefinite articles]"

say "[list of objects with indefinite articles]"

This text substitution writes out the list in sentence form, adding the appropriate indefinite articles. Example:

> let L be {the piano, the music stand};
> say "[L with definite articles]";

says "a piano and a music stand".

See 21.3. 21.3. Saying lists of values

Responses

say "[text of response]"

| say "[text of response]" This text substitution writes out the current text of the given response. See 14.10. 14.10. Responses |

Values

Making conditions true

now (a condition)

now (a condition)

This phrase makes the condition become true. Examples:

> now the score is 100;
> now the player is Kevin;
> now the front door is open;
> now Mr Darcy is wearing the top hat;
> now all the doors are open;
> now all of the things in the sack are in the box;

Inform issues a problem message if the condition asks to do the impossible ("now 3 is an even number") or is vague ("now the duck is not in the Lily Pond") or not in the present tense ("now the front door had been open").

See 8.11. 8.11. Now...

Kind: phrase nothing -> nothing

Giving values temporary names

let (a new name) be (value)

let (a new name) be (value)

This phrase creates a new temporary variable, starting it with the value supplied. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Examples:

> let outer bull be 25;
> let the current appearance be "reddish brown";
> let the special room be Marley Wood;

The kinds of these are deduced from the values given, so that, for instance,

> say "The outer bull scores [the outer bull in words] when you practice archery in [special room]."

produces

> The outer bull scores twenty-five when you practice archery in Marley Wood.

The variable name should be a new one; if it's the name of an existing one, then the kinds must agree. So:

> let outer bull be 25;
> let outer bull be 50;

is a legal combination, because the second "let" simply changes the value of the existing "outer bull" variable to a different number.

See 11.15. 11.15. Let and temporary variables

Kind: phrase (value, value) -> nothing

let (a new name) be (name of kind)

let (a new name) be (name of kind)

This phrase creates a new temporary variable of the given kind. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Example:

> let inner bull be a number;

The variable created holding the default value for that kind - in this case, the number 0. A handful of very obscure kinds have no default values, and then a problem message is produced. Inform also disallows:

> let the conveyance be a vehicle;

because temporary variables aren't allowed to have kinds more specific than "object". (This is a good thing: suppose there are no vehicles in the world?) It's quite safe in such cases to use

> let the conveyance be an object;

instead, which creates it as the special object value "nothing".

See 11.15. 11.15. Let and temporary variables

Kind: phrase (value, value) -> nothing

let (a new name) be (description of relations of values)

let (a new name) be (description of relations of values)

This phrase creates a new temporary variable, and sets its value to the identity of a newly created and equally temporary relation. These last only for the present block of phrases, which certainly means that they exist only in the current rule. Example:

> let the password dictionary be a relation of texts;

This makes a purely temporary various-to-various relation between texts, which lasts as long as the temporary value "password dictionary" lasts. By default, relations are various-to-various, but we could instead write, say:

> let the nicknames catalogue be a various-to-one relation of texts;

See 13.15. 13.15. Temporary relations

Kind: phrase (value, description of relations of Ks to Ls) -> nothing

let (a new name) be given by (equation name)

let (a new name) be given by (equation name)

This phrase creates a new temporary variable, starting it with the value found by solving the given equation. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Example:

> let F be given by Newton's Second Law where a is the acceleration due to gravity;

There is also a more compact syntax, giving the equation explicitly:

> let KE be given by KE = mv^2/2 where KE is an energy;

See 15.18. 15.18. Equations

Kind: phrase (value, equation name) -> nothing

let (a temporary named value) be (value)

let (a temporary named value) be (value)

This phrase creates a new temporary variable, starting it with the value supplied. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Examples:

> let outer bull be 25;
> let the current appearance be "reddish brown";
> let the special room be Marley Wood;

The kinds of these are deduced from the values given, so that, for instance,

> say "The outer bull scores [the outer bull in words] when you practice archery in [special room]."

produces

> The outer bull scores twenty-five when you practice archery in Marley Wood.

The variable name should be a new one; if it's the name of an existing one, then the kinds must agree. So:

> let outer bull be 25;
> let outer bull be 50;

is a legal combination, because the second "let" simply changes the value of the existing "outer bull" variable to a different number.

See 11.15. 11.15. Let and temporary variables

Kind: phrase (value, value) -> nothing

let (a temporary named value) be given by (equation name)

let (a temporary named value) be given by (equation name)

This phrase creates a new temporary variable, starting it with the value found by solving the given equation. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Example:

> let F be given by Newton's Second Law where a is the acceleration due to gravity;

There is also a more compact syntax, giving the equation explicitly:

> let KE be given by KE = mv^2/2 where KE is an energy;

See 15.18. 15.18. Equations

Kind: phrase (value, equation name) -> nothing

increase (a stored value) by (value)

increase (a stored value) by (value)

This phrase increases the variable, table entry, list entry, or property by the given amount, which must be of a compatible kind. Example:

> increase the score by 8;
> increase the time of day by 5 minutes;

See 8.12. 8.12. Increasing and decreasing

Kind: phrase (value, value) -> nothing

decrease (a stored value) by (value)

decrease (a stored value) by (value)

This phrase decreases the variable, table entry, list entry, or property by the given amount, which must be of a compatible kind. Example:

> decrease the score by 6;
> decrease the carrying capacity of the player by 10;

See 8.12. 8.12. Increasing and decreasing

Kind: phrase (value, value) -> nothing

increment (a stored value)

increment (a stored value)

This phrase increases the variable, table entry, list entry, or property by 1. Example:

> increment the score;

See 8.12. 8.12. Increasing and decreasing

Kind: phrase value -> nothing

decrement (a stored value)

decrement (a stored value)

This phrase decreases the variable, table entry, list entry, or property by 1. Example:

> decrement the score;

See 8.12. 8.12. Increasing and decreasing

Kind: phrase value -> nothing

Arithmetic

(arithmetic value) + (arithmetic value) ... value

(arithmetic value) plus (arithmetic value) ... value

(arithmetic value) + (arithmetic value) ... value

This phrase performs signed addition on the given values, whose kinds must agree, and produces the result. Examples:

> 200 + 1 = 201
> 10:04 AM + two minutes = 10:06 AM

See 15.5. 15.5. Arithmetic

Kind: phrase (arithmetic value, arithmetic value) -> arithmetic value

(arithmetic value) - (arithmetic value) ... value

(arithmetic value) minus (arithmetic value) ... value

(arithmetic value) - (arithmetic value) ... value

This phrase performs signed subtraction on the given values, whose kinds must agree, and produces the result. Examples:

> 200 - 1 = 199
> 10:04 AM - two minutes = 10:02 AM

See 15.5. 15.5. Arithmetic

Kind: phrase (arithmetic value, arithmetic value) -> arithmetic value

(arithmetic value) * (arithmetic value) ... value

(arithmetic value) times (arithmetic value) ... value

(arithmetic value) multiplied by (arithmetic value) ... value

(arithmetic value) * (arithmetic value) ... value

This phrase performs signed multiplication on the given values, whose kinds must be dimensionally compatible, and produces the result. Examples:

> 201 times 3 = 603
> two minutes times 4 = eight minutes

See 15.5. 15.5. Arithmetic

Kind: phrase (arithmetic value, arithmetic value) -> arithmetic value

(arithmetic value) / (arithmetic value) ... value

(arithmetic value) divided by (arithmetic value) ... value

(arithmetic value) / (arithmetic value) ... value

This phrase performs signed division on the given values, whose kinds must be dimensionally compatible, and produces the result. Examples:

> 201 divided by 3 = 67
> 202 divided by 3 = 67
> 202.0 divided by 3 = 67.33334
> twenty minutes divided by 4 = five minutes
> twenty minutes divided by five minutes = 4

Division rounds whole-number values down to the nearest whole number. An attempt to divide a number by 0 will cause a run-time problem message; but an attempt to divide a real number by 0 will instead produce plus infinity or minus infinity.

See 15.5. 15.5. Arithmetic

Kind: phrase (arithmetic value, arithmetic value) -> arithmetic value

remainder after dividing (arithmetic value) by (arithmetic value) ... value

remainder after dividing (arithmetic value) by (arithmetic value) ... value

This phrase performs signed division on the given values, whose kinds must be dimensionally compatible, and then produces the remainder. Examples:

> remainder after dividing 201 by 5 = 1
> remainder after dividing twenty minutes by 7 = six minutes

It is mathematically impossible to divide by 0, so any attempt to find the remainder after dividing a number by 0 will cause a run-time problem message. For a real number this won't arise and the remainder will usually be 0.0.

See 15.5. 15.5. Arithmetic

Kind: phrase (arithmetic value, arithmetic value) -> arithmetic value

(arithmetic value) to the nearest (arithmetic value) ... value

(arithmetic value) to the nearest (arithmetic value) ... value

This phrase rounds the given value off, rounding upward in boundary cases. Examples:

> 201 to the nearest 5 = 200
> 205 to the nearest 10 = 210
> 10:27 AM to the nearest five minutes = 10:25 AM

See 15.5. 15.5. Arithmetic

Kind: phrase (arithmetic value, arithmetic value) -> arithmetic value

square root of (arithmetic value) ... value

square root of (arithmetic value) ... value

This phrase produces an approximate square root, to the nearest integer, of the given value, which must be of a kind which has square roots. Example:

> square root of 16 = 4

Trying to take the square root of a negative number will cause a run-time problem, because then we can't even nearly solve it.

(Warning: this is slow to compute if the Z-machine setting is used. For

best performance, use Glulx.)

See 15.5. 15.5. Arithmetic

Kind: phrase arithmetic value -> arithmetic value

cube root of (arithmetic value) ... value

cube root of (arithmetic value) ... value

This phrase produces an approximate cube root, to the nearest integer, of the given value, which must be of a kind which has cube roots. Example:

> cube root of 27 = 3
> cube root of -27 = -3

(Warning: this is not very accurate if the Z-machine setting is used. For

best performance, use Glulx.)

See 15.5. 15.5. Arithmetic

Kind: phrase arithmetic value -> arithmetic value

total (arithmetic values valued property) of (description of values) ... value

total (arithmetic values valued property) of (description of values) ... value

This phrase produces the total of some property held by all of the values matching the description. A problem message is produced if the values in question can't have that property ("the total carrying capacity of scenes"), or if it holds a kind of value which can't meaningfully be added up ("the total description of open doors"). Example:

> total carrying capacity of people in the Deep Pool

See 15.17. 15.17. Totals

Kind: phrase (arithmetic values valued property, description of values) -> arithmetic value

Real Arithmetic (for Glulx only)

say "[real number to number decimal places]"

say "[real number to number decimal places]"

This text substitution writes out the number to the given number of decimal places. Examples:

> "The semicircle is roughly [pi to 3 decimal places] paces around."

produces "The semicircle is roughly 3.142 paces around." The number of places can only usefully be from 1 to 8. Note that, for example, "[1.235 x 10^-7 to 3 decimal places]" produces 0.0; "[1.235678 x 10^8 to 3 decimal places]" produces "1.236 x 10^8".

See 15.4. 15.4. Printing real numbers

say "[real number in decimal notation]"

say "[real number in decimal notation]"

This text substitution writes out the number in decimal form, that is, avoiding "x 10^n" even for very large or very small quantities. For example,

> "[1.23457 x 10^8 in decimal notation]"

produces 123457000.0 rather than 1.23457 x 10^8. This can look pretty extreme: for example, "[1.8983 x 10^27 in decimal notation]", the mass of the planet Jupiter in kilograms, produces 1898296960000000000000000000.0.

See 15.4. 15.4. Printing real numbers

say "[real number to number decimal places in decimal notation]"

| say "[real number to number decimal places in decimal notation]" This text substitution writes out the number in decimal form, but rounding to the accuracy given. See 15.4. 15.4. Printing real numbers |

say "[real number in scientific notation]"

say "[real number in scientific notation]"

This text substitution writes out the number in scientific form, that is, using "x 10^n" even for easy-to-judge quantities. For example,

> "[the reciprocal of 137 in scientific notation]"

produces 7.29927 x 10^-3 rather than 0.0073. This can look odd: for example, "[pi in scientific notation]" comes out as 3.14159 x 10^0 rather than 3.14159.

See 15.4. 15.4. Printing real numbers

say "[real number to number decimal places in scientific notation]"

| say "[real number to number decimal places in scientific notation]" This text substitution writes out the number in scientific form, but rounding to the accuracy given. See 15.4. 15.4. Printing real numbers |

reciprocal of (real number) ... real number

reciprocal of (real number) ... real number

Calculates 1/x, that is, divides up 1 into this many pieces. Examples:

> reciprocal of -2 = -0.5
> reciprocal of 0.1 = 10.0
> reciprocal of 7 = 0.14286
> reciprocal of plus infinity = 0.0

See 15.6. 15.6. Powers and logarithms

Kind: phrase real number -> real number

absolute value of (real number) ... real number y = abs(x)

absolute value of (real number) ... real number y = abs(x)

Removes the sign from a value, leaving positive numbers alone but making negative ones positive. Examples:

> absolute value of 62.1 = 62.1
> absolute value of 0 = 0.0
> absolute value of -62.1 = 62.1
> absolute value of minus infinity = plus infinity

See 15.6. 15.6. Powers and logarithms

In equations: write as abs()

Name: abs function

Kind: phrase real number -> real number

real square root of (real number) ... real number y = root(x)

real square root of (real number) ... real number y = root(x)

This phrase produces a square root, as accurately as a real number can hold it, of the given value, which must be of a kind which has square roots. Example:

> real square root of 2 = 1.41421

The real square root of a negative number is nonexistent.

See 15.5. 15.5. Arithmetic

In equations: write as root()

Name: root function

Kind: phrase real number -> real number

real square of (real number) ... real number y = rsqr(x)

| real square of (real number) ... real number y = rsqr(x) In equations: write as rsqr() Name: rsqr function Kind: phrase real number -> real number |

ceiling of (real number) ... real number y = ceiling(x)

ceiling of (real number) ... real number y = ceiling(x)

Produces the smallest integer value greater than or equal to the one given. Examples:

> ceiling of pi = 4.0
> ceiling of -16.315 = -16.0

(Note that the result is still a real number; it simply has no fractional part any more.)

See 15.6. 15.6. Powers and logarithms

In equations: write as ceiling()

Name: ceiling function

Kind: phrase real number -> real number

floor of (real number) ... real number y = floor(x)

floor of (real number) ... real number y = floor(x)

Produces the largest integer value less than or equal to the one given. Examples:

> floor of pi = 3.0
> floor of -16.315 = -17.0

(Note that the result is still a real number; it simply has no fractional part any more.)

See 15.6. 15.6. Powers and logarithms

In equations: write as floor()

Name: floor function

Kind: phrase real number -> real number

(real number) to the nearest whole number ... number y = int(x)

(real number) to the nearest whole number ... number y = int(x)

This phrase performs signed addition on the given values, whose kinds must agree, and produces the result. Examples:

> 1.4 to the nearest whole number = 1
> 1.6 to the nearest whole number = 2
> -1.6 to the nearest whole number = -2

We probably ought to bear in mind that the limited range of "number" means that the nearest whole number might not be all that near. For example:

> 6 x 10^23 to the nearest whole number = 2147483647

because 2147483647 is the highest value a "number" can have.

See 15.3. 15.3. Real number conversions

In equations: write as int()

Name: int function

Kind: phrase real number -> number

natural/-- logarithm of (real number) ... real number y = log(x)

natural/-- logarithm of (real number) ... real number y = log(x)

Finds what power e would have to be raised to in order to get this value. Examples:

> logarithm of e = 1.0
> logarithm of 1 = 0.0
> logarithm of 1000 = 6.90776
> logarithm of exponential of 7.12 = 7.12

Logarithms of zero or negative numbers are nonexistent. This is the function which most calculators label as "ln", for "log natural", but in mathematical and scientific papers it's more often written "log", and Inform follows that convention.

See 15.6. 15.6. Powers and logarithms

In equations: write as log()

Name: log function

Kind: phrase real number -> real number

logarithm to base (number) of (real number) ... real number

logarithm to base (number) of (real number) ... real number

Finds what power the base would have to be raised to in order to get this value. Examples:

> logarithm to base 10 of 1000000 = 6.0
> logarithm to base 10 of 350 = 2.54407
> logarithm to base 2 of 256 = 8.0

Logarithms of zero or negative numbers are nonexistent. Note that "logarithm to base 10 of ..." is what most calculators call simply "log", but Inform doesn't: it uses "log" for natural logarithms.

See 15.6. 15.6. Powers and logarithms

Kind: phrase (number, real number) -> real number

exponential of (real number) ... real number y = exp(x)

exponential of (real number) ... real number y = exp(x)

Computes e to the given power, where e is the base of natural logarithms. Examples:

> exponential of 0 = 1.0
> exponential of 1 = e = 2.7182818
> exponential of -10 = 4.53999 x 10^-5
> exponential of 10 = 22026.46484
> exponential of logarithm of 7.12 = 7.12

See 15.6. 15.6. Powers and logarithms

In equations: write as exp()

Name: exp function

Kind: phrase real number -> real number

(real number) to the power (real number) ... real number

(real number) to the power (real number) ... real number

Computes x to the power y. Examples:

> 2 to the power 4 = 16.0
> 100 to the power 0.5 = 10.0
> 7 to the power -1 = 0.14286
> pi to the power 0 = 1.0

In the words of the Glulx specification document (section 2.12), "the special cases are breathtaking": if you need to know exactly what, say, "minus infinity to the power Y" will do for different cases of Y, refer to the details of the "pow" opcode.

See 15.6. 15.6. Powers and logarithms

Kind: phrase (real number, real number) -> real number

Trigonometry (for Glulx only)

(real number) degrees ... real number

(real number) degrees ... real number

Inform measures angles in radians, a convention in which the angle for a half circle is pi, and a right angle is pi divided by 2. This is better from a mathematical point of view, but in practice most people think about angles using degrees, where 180 degrees is a half-circle and a right angle is 90 degrees. This phrase helps with that by converting from degrees to radians: in other words, it multiplies by 0.0174532925, since that's roughly 1/180th of pi. Examples:

> sine of 90 degrees = 0.0
> cosine of 60 degrees = 0.5

See 15.7. 15.7. Trigonometry

Kind: phrase real number -> real number

sine of (real number) ... real number y = sin(x)

sine of (real number) ... real number y = sin(x)

The length of the upright of a right-angled triangle with this angle and a hypotenuse of length 1, where angle is measured in radians. Examples:

> sine of 0 = 0
> sine of 45 degrees = 0.70711
> sine of (pi divided by 4) = 0.70711
> sine of (pi divided by 2) = 1.0
> sine of pi = 0

See 15.7. 15.7. Trigonometry

In equations: write as sin()

Name: sin function

Kind: phrase real number -> real number

cosine of (real number) ... real number y = cos(x)

cosine of (real number) ... real number y = cos(x)

The length of the base of a right-angled triangle with this angle and a hypotenuse of length 1, where angle is measured in radians. Examples:

> cosine of 0 = 1.0
> cosine of 45 degrees = 0.70711
> cosine of (pi divided by 4) = 0.70711
> cosine of (pi divided by 2) = 0.0
> cosine of pi = -1.0

See 15.7. 15.7. Trigonometry

In equations: write as cos()

Name: cos function

Kind: phrase real number -> real number

tangent of (real number) ... real number y = tan(x)

tangent of (real number) ... real number y = tan(x)

The ratio of the upright length to the base length in a right-angled triangle with this angle and a hypotenuse of length 1, where angle is measured in radians. Examples:

> tangent of 0 = 0.0
> tangent of 45 degrees = 1.0
> tangent of (pi divided by 4) = 1.0
> tangent of (pi divided by 2) = plus infinity

See 15.7. 15.7. Trigonometry

In equations: write as tan()

Name: tan function

Kind: phrase real number -> real number

arcsine of (real number) ... real number y = arcsin(x)

| arcsine of (real number) ... real number y = arcsin(x) The inverse of the sine function. See 15.7. 15.7. Trigonometry In equations: write as arcsin() Name: arcsin function Kind: phrase real number -> real number |

arccosine of (real number) ... real number y = arccos(x)

| arccosine of (real number) ... real number y = arccos(x) The inverse of the cosine function. See 15.7. 15.7. Trigonometry In equations: write as arccos() Name: arccos function Kind: phrase real number -> real number |

arctangent of (real number) ... real number y = arctan(x)

| arctangent of (real number) ... real number y = arctan(x) The inverse of the tangent function. See 15.7. 15.7. Trigonometry In equations: write as arctan() Name: arctan function Kind: phrase real number -> real number |

Hyperbolic functions (for Glulx only)

hyperbolic sine of (real number) ... real number y = sinh(x)

| hyperbolic sine of (real number) ... real number y = sinh(x) The hyperbolic sine function, often written "sinh" but pronounced "shine". See 15.7. 15.7. Trigonometry In equations: write as sinh() Name: sinh function Kind: phrase real number -> real number |

hyperbolic cosine of (real number) ... real number y = cosh(x)

| hyperbolic cosine of (real number) ... real number y = cosh(x) The hyperbolic cosine function, often written "cosh". See 15.7. 15.7. Trigonometry In equations: write as cosh() Name: cosh function Kind: phrase real number -> real number |

hyperbolic tangent of (real number) ... real number y = tanh(x)

| hyperbolic tangent of (real number) ... real number y = tanh(x) The hyperbolic tangent function, often written "tanh". See 15.7. 15.7. Trigonometry In equations: write as tanh() Name: tanh function Kind: phrase real number -> real number |

hyperbolic arcsine of (real number) ... real number y = arcsinh(x)

| hyperbolic arcsine of (real number) ... real number y = arcsinh(x) The inverse of the hyperbolic sine function. See 15.7. 15.7. Trigonometry In equations: write as arcsinh() Name: arcsinh function Kind: phrase real number -> real number |

hyperbolic arccosine of (real number) ... real number y = arccosh(x)

| hyperbolic arccosine of (real number) ... real number y = arccosh(x) The inverse of the hyperbolic cosine function. See 15.7. 15.7. Trigonometry In equations: write as arccosh() Name: arccosh function Kind: phrase real number -> real number |

hyperbolic arctangent of (real number) ... real number y = arctanh(x)

| hyperbolic arctangent of (real number) ... real number y = arctanh(x) The inverse of the hyperbolic tangent function. See 15.7. 15.7. Trigonometry In equations: write as arctanh() Name: arctanh function Kind: phrase real number -> real number |

Enumerations

number of (description of values) ... number

number of (description of values) ... number

This phrase counts the number of values matching the description, which may of course be 0. Example:

> number of open doors

produces the number of doors, anywhere in the model world, which are currently open. A Problem message is produced if the number is potentially infinite, or impractical to count: for instance, Inform rejects "number of odd numbers".

See 6.1. 6.1. What are descriptions?

Kind: phrase description of values -> number

(name of kind) after (enumerated value) ... value

(name of kind) after (enumerated value) ... value

This phrase produces the next-created value of the given kind, which should be an enumeration. Example: if we have

> Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet.

then "colour after orange" is yellow.

See 11.18. 11.18. The value after and the value before

Kind: phrase (K [enumerated value], K) -> K

(name of kind) before (enumerated value) ... value

(name of kind) before (enumerated value) ... value

This phrase produces the previous-created value of the given kind, which should be an enumeration. Example: if we have

> Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet.

then "colour before blue" is green.

See 11.18. 11.18. The value after and the value before

Kind: phrase (K [enumerated value], K) -> K

first value of (name of kind) ... value

first value of (name of kind) ... value

This phrase produces the first-created value of the given kind, which should be an enumeration. Example: if we have

> Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet.

then "first value of colour" is red.

See 11.18. 11.18. The value after and the value before

Kind: phrase K [enumerated value] -> K

last value of (name of kind) ... value

last value of (name of kind) ... value

This phrase produces the last-created value of the given kind, which should be an enumeration. Example: if we have

> Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet.

then "last value of colour" is violet.

See 11.18. 11.18. The value after and the value before

Kind: phrase K [enumerated value] -> K

Truth states

whether or not (a condition) ... truth state

whether or not (a condition) ... truth state

This phrase converts a condition into its result as a value, which is always either "true" or "false". Example:

> whether or not 20 is an odd number

produces the truth state "false". This is mostly useful for storing up results to look at later:

> let victory be whether or not all the treasures are in the cabinet;

and then subsequently:

> if victory is true, ...

See 11.5. 11.5. Conditions and questions

Kind: phrase nothing -> truth state

Randomness

a/-- random (description of values) ... value

a/-- random (description of values) ... value

This phrase makes a uniformly random choice from values satisfying the description given. Example:

> a random visited room
> a random scene

A problem message is issued if the range is too large (for instance, "a random text"). Unexpected results may follow if no value fits the description, unless we are describing objects, in which case the result is the special value "nothing".

See 8.19. 8.19. Random choices of things

Kind: phrase description of Ks -> K

a random (name of kind) between (arithmetic value) and (arithmetic value) ... value

a random (name of kind) from (arithmetic value) to (arithmetic value) ... value

a random (name of kind) between (enumerated value) and (enumerated value) ... value

a random (name of kind) from (enumerated value) to (enumerated value) ... value

a random (name of kind) between (arithmetic value) and (arithmetic value) ... value

This phrase produces a uniformly random value in the range given. Examples:

> a random number from 10 to 99
> a random time from 2:31 PM to 2:57 PM

If we make a new kind of value:

> A cloud pattern is a kind of value. The cloud patterns are cumulus, altocumulus, cumulonimbus, stratus, cirrus, nimbus, nimbostratus.

then we can also take random values from it:

> a random cloud pattern between stratus and nimbus

which has three possible outcomes, all equally likely.

See 8.18. 8.18. Randomness

Kind: phrase (K [arithmetic value], K, K) -> K

if a random chance of (number) in (number) succeeds:

if a random chance of (number) in (number) succeeds:

This condition is true X/Yths of the time, where X and Y are the numbers. Example:

> if a random chance of 2 in 3 succeeds, ...

Here is a rule which applies only 15% of the time:

> Instead of waiting when a random chance of 15 in 100 succeeds: ...

See 8.18. 8.18. Randomness

Kind: phrase (number, number) -> truth state

seed the random-number generator with (number)

seed the random-number generator with (number)

This phrase changes the seed number as specified. Any random numbers generated after that depend only on the seed. Example: the following sentence will "fix" the process of generating these random numbers so that they are not random at all - the same sequence of random numbers will be produced on each run.

> When play begins, seed the random-number generator with 1234.

The seed value "1234" can be anything positive; a different sequence of random numbers will be produced for each different seed value. A seed value of 0 restores the RNG to properly random behaviour again.

See 8.18. 8.18. Randomness

Kind: phrase number -> nothing

Tables

choose a/the/-- row (number) in/from (table name)

choose a/the/-- row (number) in/from (table name)

This phrase selects the row with the given number. Row numbers in a table start from 1, so

> choose row 1 from the Table of Recent Monarchs

selects the top row.

See 16.5. 16.5. Choosing rows

Kind: phrase (number, table name) -> nothing

choose a/the/-- row with (table column) of (value) in/from (table name)

choose a/the/-- row with (table column) of (value) in/from (table name)

This phrase selects the first row, working down from the top of the given table, in which the given column has the given value. Example:

> choose row with a name of "Victoria" in the Table of Recent Monarchs;

A run-time problem message is produced if the value isn't found anywhere in that column.

See 16.5. 16.5. Choosing rows

Kind: phrase (Ks valued table column, K, table name) -> nothing

choose a/the/-- blank row in/from (table name)

choose a/the/-- blank row in/from (table name)

This phrase chooses a row in the given table which is currently blank under every column. A run-time problem message is issued if no rows are blank. Example:

> choose a blank row in Table 3;
> now element entry is "Fluorine";
> now symbol entry is "F";
> now atomic number entry is 9;
> now atomic weight entry is 19;

See 16.10. 16.10. Adding and removing rows

Kind: phrase table name -> nothing

choose a/the/-- random row in/from (table name)

| choose a/the/-- random row in/from (table name) This phrase makes a uniformly random choice of non-blank rows in the given table. Note that although a table always has at least one row, it can't be guaranteed that it always has a non-blank row, so it's possible for this to fail: if it does, a real-time problem message is thrown. See 16.5. 16.5. Choosing rows Kind: phrase table name -> nothing |

number of rows in/from (table name) ... number

number of rows in/from (table name) ... number

This phrase produces the number of rows (including any blank rows) in the given table. Example:

> number of rows in the Table of Selected Elements

See 16.2. 16.2. Looking up entries

Kind: phrase table name -> number

number of blank rows in/from (table name) ... number

| number of blank rows in/from (table name) ... number This phrase produces the number of rows in the given table which are entirely blank (that is, blank under every column). See 16.10. 16.10. Adding and removing rows Kind: phrase table name -> number |

number of filled rows in/from (table name) ... number

| number of filled rows in/from (table name) ... number This phrase produces the number of rows in the given table which are not entirely blank (that is, at least one column has a value in this row). See 16.10. 16.10. Adding and removing rows Kind: phrase table name -> number |

if there is (a table entry):

if there is (a table entry):

This condition is true if the entry referred to exists, that is, that is, the space for it in the table is not blank. Examples:

> if there is a symbol corresponding to an atomic number of 30 in the Table of Standard Elements ...
> if there is an atomic number in row 2 of the Table of Standard Elements ...

See 16.7. 16.7. Blank entries

Kind: phrase value -> truth state

if there is no (a table entry):

if there is no (a table entry):

This condition is true if the entry referred to does not exist, that is, the space for it in the table is blank. Examples:

> if there is no symbol corresponding to an atomic number of 30 in the Table of Standard Elements ...
> if there is no atomic number in row 2 of the Table of Standard Elements ...

See 16.7. 16.7. Blank entries

Kind: phrase value -> truth state

blank out (a table entry)

blank out (a table entry)

This phrase replaces the entry referred to with a blank, erasing any value previously stored there. Example:

> choose row 1 in the Table of Fish Habitats;
> blank out the salinity entry;

See 16.10. 16.10. Adding and removing rows

Kind: phrase value -> nothing

blank out the whole row

blank out the whole row

This phrase replaces the currently chosen row with blanks, erasing any value previously stored under any of the columns. Example:

> choose row 1 in the Table of Fish Habitats;
> blank out the whole row;

See 16.10. 16.10. Adding and removing rows

Kind: phrase nothing -> nothing

blank out the whole (table column) in/from (table name)

blank out the whole (table column) in/from (table name)

This phrase replaces the currently chosen column with blanks, erasing any value previously stored in any of the rows. Example:

> blank out the whole salinity column in the Table of Fish Habitats;

See 16.10. 16.10. Adding and removing rows

Kind: phrase (table column, table name) -> nothing

blank out the whole of (table name)

blank out the whole of (table name)

This phrase replaces every row of the currently chosen table with blanks, erasing any value previously stored anywhere in it. Example:

> blank out the whole of the Table of Fish Habitats;

This is only really useful when a Table is being used to hold working space for some calculation or other.

See 16.10. 16.10. Adding and removing rows

Kind: phrase table name -> nothing

showme the contents of (table name)

| showme the contents of (table name) This phrase prints a crude but sometimes useful display on screen of the current contents of the named table. It's intended for authors to see when testing, not for players of the finished version to see. See 16.4. 16.4. Changing entries Kind: phrase table name -> nothing |

say "[the/-- current table row]"

| say "[the/-- current table row]" This text substitution produces a crude but sometimes useful listing of the entries in the currently chosen table row. See 16.4. 16.4. Changing entries |

say "[row number in/from table name]"

| say "[row number in/from table name]" This text substitution produces a crude but sometimes useful listing of the entries in the specified row. See 16.4. 16.4. Changing entries |

say "[table column in/from table name]"

| say "[table column in/from table name]" This text substitution produces a crude but sometimes useful listing of the entries in the specified column. See 16.4. 16.4. Changing entries |

Sorting tables

sort (table name) in/into random order

sort (table name) in/into random order

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, in a uniformly random order, and any blank rows at the bottom. Example:

> sort the Table of Recent Monarchs in random order;

See 16.11. 16.11. Sorting

Kind: phrase table name -> nothing

sort (table name) in/into (table column) order

sort (table name) in/into (table column) order

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, so that the given column has ascending order, and any blank rows at the bottom. Example:

> sort the Table of Recent Monarchs in accession order;

Ascending order means 1 up to 10, say, or A up to Z, with blank values coming last.

See 16.11. 16.11. Sorting

Kind: phrase (table name, table column) -> nothing

sort (table name) in/into reverse (table column) order

sort (table name) in/into reverse (table column) order

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, so that the given column has descending order, and any blank rows at the bottom. Example:

> sort the Table of Recent Monarchs in reverse name order;

Descending order means 10 down to 1, say, or Z down to A, with blank values coming last.

See 16.11. 16.11. Sorting

Kind: phrase (table name, table column) -> nothing

Breaking down text

number of characters in (text) ... number

number of characters in (text) ... number

This phrase produces the number of characters from the text. Characters include letters, digits, punctuation symbols, spaces or other letter-forms. Examples:

> number of characters in "War and Peace"
> number of characters in ""

produce 13 and 0 respectively.

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase text -> number

number of words in (text) ... number

number of words in (text) ... number

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing that punctuation or spacing. Example:

> number of words in "ice-hot, don't you think?"

produces 5.

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase text -> number

number of punctuated words in (text) ... number

number of punctuated words in (text) ... number

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing the spacing, but leaving the punctuation as independent words. Example:

> number of punctuated words in "ice-hot, don't you think?"

produces 8; see if you can find them all.

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase text -> number

number of unpunctuated words in (text) ... number

number of unpunctuated words in (text) ... number

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at spacing (spaces, line breaks, paragraph breaks) but including all punctuation as if it were part of the spelling of the words it joins to. Example:

> number of unpunctuated words in "ice-hot, don't you think?"

produces just 4.

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase text -> number

number of lines in (text) ... number

number of lines in (text) ... number

This phrase produces the number of lines in the text. Unless explicit use is made of line-breaking, lines and paragraphs will be the same - it doesn't refer to lines as visible on screen, because we have no way of knowing what size screen the player might have. Example: the number of lines in

> "Sensational news just in![paragraph break]The Martians have invaded Miranda.[line break](One of the moons of Uranus, that is.)"

is 3.

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase text -> number

number of paragraphs in (text) ... number

number of paragraphs in (text) ... number

This phrase produces the number of paragraphs in the text. Example: the number of paragraphs in

> "Sensational news just in![paragraph break]The Martians have invaded Miranda.[line break](One of the moons of Uranus, that is.)"

is 2.

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase text -> number

character number (number) in (text) ... text

character number (number) in (text) ... text

This phrase produces the Nth character from the text, counting from 1. Characters include letters, digits, punctuation symbols, spaces or other letter-forms. Example:

> character number 8 in "numberless projects of social reform"

produces "e". If the index is less than 1 or more than the length of the text, the result is an empty text, "".

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase (number, text) -> text

word number (number) in (text) ... text

word number (number) in (text) ... text

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing that punctuation or spacing. Example:

> word number 3 in "ice-hot, don't you think?"

produces "don't". If the index is less than 1 or more than the number of words in the text, the result is an empty text, "".

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase (number, text) -> text

punctuated word number (number) in (text) ... text

punctuated word number (number) in (text) ... text

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing the spacing, but leaving the punctuation as independent words. Example:

> punctuated word number 2 in "ice-hot, don't you think?"

produces "-". The punctuated words here are "ice", "-", "hot", ",", "don't", "you", "think", "?". If two or more punctuation marks are adjacent, they are counted as different words, except for runs of dashes or periods: thus ",," has two punctuated words, but "--" and "..." have only one each. If the index is less than 1 or more than the number of punctuated words in the text, the result is an empty text, "".

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase (number, text) -> text

unpunctuated word number (number) in (text) ... text

unpunctuated word number (number) in (text) ... text

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at spacing (spaces, line breaks, paragraph breaks) but including all punctuation as if it were part of the spelling of the words it joins to. Example:

> unpunctuated word number 1 in "ice-hot, don't you think?"

produces "ice-hot,". The unpunctuated words in "ice-hot, don't you think?" are "ice-hot,", "don't", "you", "think?". If the index is less than 1 or more than the number of punctuated words in the text, the result is an empty text, "".

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase (number, text) -> text

line number (number) in (text) ... text

line number (number) in (text) ... text

This phrase produces the Nth line from the text, counting from 1. Unless explicit use is made of line-breaking, lines and paragraphs will be the same - it doesn't refer to lines as visible on screen, because we have no way of knowing what size screen the player might have.

See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs

Kind: phrase (number, text) -> text

paragraph number (number) in (text) ... text

| paragraph number (number) in (text) ... text This phrase produces the Nth paragraph from the text, counting from 1. See 20.3. 20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs Kind: phrase (number, text) -> text |

substituted form of (text) ... text

substituted form of (text) ... text

This takes a text and makes substitution occur immediately. For example,

> substituted form of "time of death, [time of day]"

produces something like "time of death, 9:15 AM" rather than "time of death, [time of day]". It's entirely legal to apply this to text which never had any substitutions in, so

> substituted form of "balloon"

produces "balloon".

See 20.7. 20.7. Making new text with text substitutions

Kind: phrase text -> text

Matching text

if (text) exactly matches the text (text):

if (text) exactly matches the text (text):
optionally case insensitively

This condition is true if the second text matches the first, starting at the beginning and finishing at the end. This appears to be the same as testing if one is equal to the other, but that's not quite true: for example,

> if "[score]" exactly matches the text "[best score]", ...

is true if the score and best score currently print out as the same text, which will be true if they are currently equal as numbers; but

> if "[score]" is "[best score]", ...

is never true - these are different texts, even if they sometimes look the same.

See 20.5. 20.5. Matching and exactly matching

Kind: phrase (text, text) -> truth state

if (text) matches the text (text):

if (text) matches the text (text):
optionally case insensitively

This condition is true if the second text occurs anywhere inside the first. Examples:

> if "[score]" matches the text "3", ...

tests whether the digit 3 occurs anywhere in the score, as printed out; and

> if the printed name of the location matches the text "the", ...

tests to see whether "the" can be found anywhere in the current room's name. Note that the location "Smotheringly Hot Jungle" would pass this test - it's there if you look. On the other hand, "The Orangery" would not, because "The" does not match against "the". We can get around this in a variety of ways, one of which is to tell Inform to be insensitive to the case (upper or lower) of letters:

> if the printed name of the location matches the text "the", case insensitively: ...

See 20.5. 20.5. Matching and exactly matching

Kind: phrase (text, text) -> truth state

number of times (text) matches the text (text) ... number

number of times (text) matches the text (text) ... number
optionally case insensitively

This produces the number of times the second text occurs within the first. The matches are not allowed to overlap. Example:

> number of times "pell-mell sally" matches the text "ll" = 3
> number of times "xyzzy" matches the text "Z" = 0
> number of times "xyzzy" matches the text "Z", case insensitively = 2
> number of times "aaaaaaaa" matches the text "aaaa" = 2

See 20.5. 20.5. Matching and exactly matching

Kind: phrase (text, text) -> number

if (text) exactly matches the regular expression (text):

if (text) exactly matches the regular expression (text):
optionally case insensitively

This condition is true if the whole text (starting from the beginning and finishing at the end) can be matched against the given regular expression. The option "case insensitively" causes lower and upper case letters to be treated as equivalent.

See 20.6. 20.6. Regular expression matching

Kind: phrase (text, text) -> truth state

if (text) matches the regular expression (text):

if (text) matches the regular expression (text):
optionally case insensitively

This condition is true if any contiguous part of the text can be matched against the given regular expression. Examples:

> if "taramasalata" matches the regular expression "a.*l", ...

is true, since this looks for a part of "taramasalata" which begins with "a", continues with any number of characters, and finishes with "l"; so it matches "aramasal". (Not "asal", because it gets the makes the leftmost match it can.) The option "case insensitively" causes lower and upper case letters to be treated as equivalent.

See 20.6. 20.6. Regular expression matching

Kind: phrase (text, text) -> truth state

text matching regular expression ... text

text matching regular expression ... text

This phrase is only meaningful immediately after a successful match of a regular expression against text, and it produces the text which matched. Example:

> if "taramasalata" matches the regular expression "m.*l":
> say "[text matching regular expression].";

says "masal."

See 20.6. 20.6. Regular expression matching

Kind: phrase nothing -> text

text matching subexpression (number) ... text

text matching subexpression (number) ... text

This phrase is only meaningful immediately after a successful match of a regular expression against text, and it produces the text which matched. The number must be from 1 to 9, and must correspond to one of the bracketed groups in the expression just matched. Example: after

> if "taramasalata" matches the regular expression "a(r.*l)a(.)":

the "text matching regular expression" is "aramasalat", the "text matching subexpression 1" is "ramasal", and "text matching subexpression 2" is "t".

See 20.6. 20.6. Regular expression matching

Kind: phrase number -> text

number of times (text) matches the regular expression (text) ... number

| number of times (text) matches the regular expression (text) ... number optionally case insensitively This produces the number of times that contiguous pieces of the text can be matched against the regular expression, without allowing them to overlap. See 20.6. 20.6. Regular expression matching Kind: phrase (text, text) -> number |

Replacing text

replace the text (text) in (text) with (text)

replace the text (text) in (text) with (text)
optionally case insensitively

This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible. Example:

> replace the text "a" in V with "z"

changes every lower-case "a" to "z": the same thing done with the "case insensitively" option would change each "a" or "A" to "z".

See 20.8. 20.8. Replacements

Kind: phrase (text, text, text) -> nothing

replace the regular expression (text) in (text) with (text)

replace the regular expression (text) in (text) with (text)
optionally case insensitively

This phrase acts on the named text by matching the regular expression and replacing anything which fits it, as many non-overlapping times as possible. Example:

> replace the regular expression "\d+" in V with "..."

changes "The Battle of Waterloo, 1815, rivalled Trafalgar, 1805" to "The Battle of Waterloo, ..., rivalled Trafalgar, ...". The "case insensitively" causes lower and upper case letters to be treated as if the same letter.

When replacing a regular expression, the replacement text also has a few special meanings (though, thankfully, many fewer than for the expression itself). Once again "\n" and "\t" can be used for line break and tab characters, and "\\" must be used for an actual backslash. But, very usefully, "\1" to "\9" expand as the contents of groups numbered 1 to 9, and "\0" to the exact text matched. So:

> replace the regular expression "\d+" in V with "roughly \0"

adds the word "roughly" in front of any run of digits in V, because \0 becomes in turn whichever run of digits matched. And

> replace the regular expression "(\w+) (.*)" in V with "\2, \1"

performs the transformation "Frank Booth" to "Booth, Frank".

Finally, prefixing the number by "l" or "u" forces the text it represents into lower or upper case, respectively. For instance:

> replace the regular expression "\b(\w)(\w*)" in X with "\u1\l2";

changes the casing of X to "title casing", where each individual word is capitalised. (This is a little slow on large texts, since so many matches and replacements are made: it's more efficient to use the official phrases for changing case.)

See 20.8. 20.8. Replacements

Kind: phrase (text, text, text) -> nothing

replace the word (text) in (text) with (text)

replace the word (text) in (text) with (text)

This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible, where the search text must occur as a whole word. Example:

> replace the word "Bob" in V with "Robert"

changes "Bob got on the Bobsleigh" to "Robert got on the Bobsleigh".

See 20.8. 20.8. Replacements

Kind: phrase (text, text, text) -> nothing

replace the punctuated word (text) in (text) with (text)

| replace the punctuated word (text) in (text) with (text) This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible, where the search text must occur as a whole word or run of punctuation. See 20.8. 20.8. Replacements Kind: phrase (text, text, text) -> nothing |

replace character number (number) in (text) with (text)

replace character number (number) in (text) with (text)

This phrase acts on the named text by placing the given text in place of the Nth character, counting from 1. Example:

> let V be "mope";
> replace character number 3 in V with "lecul";
> say V;

says "molecule".

See 20.8. 20.8. Replacements

Kind: phrase (number, text, text) -> nothing

replace word number (number) in (text) with (text)

replace word number (number) in (text) with (text)

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing or punctuation. Example:

> let V be "Does the well run dry?";
> replace word number 3 in V with "jogger";
> say V;

says "Does the jogger run dry?".

See 20.8. 20.8. Replacements

Kind: phrase (number, text, text) -> nothing

replace punctuated word number (number) in (text) with (text)

replace punctuated word number (number) in (text) with (text)

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing, counting punctuation runs as words in their own right. Example:

> let V be "Frankly, yes, I agree.";
> replace punctuated word number 2 in V with ":";
> say V;

says "Frankly: yes, I agree.".

See 20.8. 20.8. Replacements

Kind: phrase (number, text, text) -> nothing

replace unpunctuated word number (number) in (text) with (text)

replace unpunctuated word number (number) in (text) with (text)

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing, counting punctuation as part of a word just as if it were lettering. Example:

> let V be "Frankly, yes, I agree.";
> replace unpunctuated word number 2 in V with "of course";
> say V;

says "Frankly, of course I agree.".

See 20.8. 20.8. Replacements

Kind: phrase (number, text, text) -> nothing

replace line number (number) in (text) with (text)

| replace line number (number) in (text) with (text) This phrase acts on the named text by placing the given text in place of the Nth line, counting from 1. Lines are divided by paragraph or line breaks. See 20.8. 20.8. Replacements Kind: phrase (number, text, text) -> nothing |

replace paragraph number (number) in (text) with (text)

| replace paragraph number (number) in (text) with (text) This phrase acts on the named text by placing the given text in place of the Nth paragraph, counting from 1. See 20.8. 20.8. Replacements Kind: phrase (number, text, text) -> nothing |

Casing of text

(text) in lower case ... text

(text) in lower case ... text

This phrase produces a new version of the given text, but with all upper case letters reduced to lower case. Example: "a ticket to Tromsø via Østfold" becomes

> "a ticket to tromsø via østfold"

See 20.4. 20.4. Upper and lower case letters

Kind: phrase text -> text

(text) in upper case ... text

(text) in upper case ... text

This phrase produces a new version of the given text, but with all upper case letters reduced to lower case. Example: "a ticket to Tromsø via Østfold" becomes

> "A TICKET TO TROMSØ VIA ØSTFOLD"

See 20.4. 20.4. Upper and lower case letters

Kind: phrase text -> text

(text) in title case ... text

(text) in title case ... text

This phrase produces a new version of the given text, but with casing of words changed to title casing: this capitalises the first letter of each word, and lowers the rest. Example: "a ticket to Tromsø via Østfold" becomes

> "A Ticket To Tromsø Via Østfold"

See 20.4. 20.4. Upper and lower case letters

Kind: phrase text -> text

(text) in sentence case ... text

(text) in sentence case ... text

This phrase produces a new version of the given text, but with casing of words changed to sentence casing: this capitalises the first letter of each sentence and reduces the rest to lower case. Example: "a ticket to Tromsø via Østfold" becomes

> "A ticket to tromsø via østfold"

See 20.4. 20.4. Upper and lower case letters

Kind: phrase text -> text

if (text) is in lower case:

| if (text) is in lower case: This condition is true if every character in the text is a lower case letter. Examples: this is true for "wax", but false for "wax seal" or "eZ mOnEy". See 20.4. 20.4. Upper and lower case letters Kind: phrase text -> truth state |

if (text) is in upper case:

| if (text) is in upper case: This condition is true if every character in the text is in upper case. Examples: this is true for "BEESWAX", but false for "ROOM 101". See 20.4. 20.4. Upper and lower case letters Kind: phrase text -> truth state |

Adaptive text

say "[infinitive of verb]"

| say "[infinitive of verb]" Produces the infinitive of the given verb. Note that this is without a "to": for example, "[infinitive of the verb carry]" is "carry", not "to carry". See 14.9. 14.9. Verbs as values |

say "[past participle of verb]"

| say "[past participle of verb]" Produces the past participle of the given verb. For example, "[past participle of the verb carry]" is "carried". Warning: because modal verbs like "should" or "might" are defective in English, this will produce odd results on them - "shoulded" and "mighted", for example. See 14.9. 14.9. Verbs as values |

say "[present participle of verb]"

| say "[present participle of verb]" Produces the present participle of the given verb. For example, "[present participle of the verb carry]" is "carrying". Warning: because modal verbs like "should" or "might" are defective in English, this will produce odd results on them - "shoulding" and "mighting", for example. See 14.9. 14.9. Verbs as values |

say "[adapt verb]"

| say "[adapt verb]" Adapts the given verb to the current story tense and story viewpoint. For example, "you [adapt the verb provoke]" might produce "you provoke". See 14.9. 14.9. Verbs as values |

say "[adapt verb in grammatical tense]"

| say "[adapt verb in grammatical tense]" Adapts the given verb to the given tense but the current story viewpoint. For example, "you [adapt the verb provoke in the past tense]" might produce "you provoked". See 14.9. 14.9. Verbs as values |

say "[adapt verb from narrative viewpoint]"

| say "[adapt verb from narrative viewpoint]" Adapts the given verb to the current story tense but the given viewpoint. For example, "he [adapt the verb provoke from the third person singular]" might produce "he provokes". See 14.9. 14.9. Verbs as values |

say "[adapt verb in grammatical tense from narrative viewpoint]"

| say "[adapt verb in grammatical tense from narrative viewpoint]" Adapts the given verb to the given tense and viewpoint. For example, "we [adapt the verb provoke in the future tense from the first person plural]" might produce "we will provoke". See 14.9. 14.9. Verbs as values |

say "[negate verb]"

| say "[negate verb]" Adapts the given verb to the current story tense and story viewpoint, giving it a negative sense. For example, "you [negate the verb provoke]" might produce "you do not provoke". See 14.9. 14.9. Verbs as values |

say "[negate verb in grammatical tense]"

| say "[negate verb in grammatical tense]" Adapts the given verb to the given tense but the current story viewpoint, giving it a negative sense. For example, "you [negate the verb provoke in the past tense]" might produce "you did not provoke". See 14.9. 14.9. Verbs as values |

say "[negate verb from narrative viewpoint]"

| say "[negate verb from narrative viewpoint]" Adapts the given verb to the current story tense but the given viewpoint, giving it a negative sense. For example, "he [negate the verb provoke from the third person singular]" might produce "he does not provoke". See 14.9. 14.9. Verbs as values |

say "[negate verb in grammatical tense from narrative viewpoint]"

| say "[negate verb in grammatical tense from narrative viewpoint]" Adapts the given verb to the given tense and viewpoint, giving it a negative sense. For example, "we [negate the verb provoke in the future tense from the first person plural]" might produce "we will not provoke". See 14.9. 14.9. Verbs as values |

meaning of (verb) ... relation of objects

| meaning of (verb) ... relation of objects Kind: phrase verb -> relation of objects |

say "[here]"

| say "[here]" Produces "here" if the story tense is the present tense, and "there" otherwise. See 14.1. 14.1. Tense and narrative viewpoint |

say "[now]"

| say "[now]" Produces "now" if the story tense is the present tense, and "then" otherwise. See 14.1. 14.1. Tense and narrative viewpoint |

Lists

add (value) to (list of values)

add (value) to (list of values)
optionally if absent

This phrase adds the given value to the end of the list. Example:

> let L be {60, 168};
> add 360 to L;

results in L being {60, 168, 360}. Note that the value is added even if it already occurs somewhere in L; this can be avoided with "if absent". So:

> add 168 to L, if absent;

would do nothing - it is already there.

See 21.5. 21.5. Building lists

Kind: phrase (K, list of Ks) -> nothing

add (value) at entry (number) in (list of values)

add (value) at entry (number) in (list of values)
optionally if absent

This phrase adds the given value so that it becomes the entry with that index number in the list. Example:

> let L be {1, 2, 3, 4, 8, 24};
> add 12 at entry 6 in L;

sets L to {1, 2, 3, 4, 8, 12, 24}. If there are N entries in L, then we can add at any of entries 1 up to N+1: adding at entry N+1 means adding at the end. The phrase option "if absent" makes the phrase do nothing if the value already exists anywhere in L.

See 21.5. 21.5. Building lists

Kind: phrase (K, number, list of Ks) -> nothing

add (list of values) to (list of values)

add (list of values) to (list of values)
optionally if absent

This phrase adds the first list to the end of the second. Example:

> let L be {2, 3, 5, 7};
> add {11, 13, 17, 19} to L;

results in L being {2, 3, 5, 7, 11, 13, 17, 19}.

See 21.5. 21.5. Building lists

Kind: phrase (list of Ks, list of Ks) -> nothing

add (list of values) at entry (number) in (list of values)

add (list of values) at entry (number) in (list of values)

This phrase adds the first list to the second so that it begins at the given position. Example:

> let L be {1, 2, 3, 4};
> add {4, 8, 12} at entry 3 in L;

results in L being {1, 2, 4, 8, 12, 3, 4}.

See 21.5. 21.5. Building lists

Kind: phrase (list of Ks, number, list of Ks) -> nothing

remove (value) from (list of values)

remove (value) from (list of values)
optionally if present

This phrase removes every instance of the given value from the list. Example:

> let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3};
> remove 1 from L;

results in L being {3, 4, 5, 9, 2, 6, 5, 3}. Ordinarily "remove 7 from L" would produce a run-time problem, since L does not contain the value 7, but using the "if present" option lets us off this: the phrase then does nothing if L does not contain the value to be removed.

See 21.5. 21.5. Building lists

Kind: phrase (K, list of Ks) -> nothing

remove (list of values) from (list of values)

remove (list of values) from (list of values)
optionally if present

This phrase removes every instance of any value in the first list from the second. Example:

> let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3};
> remove {0, 2, 4, 6, 8} from L;

results in L being {3, 1, 1, 5, 9, 5, 3}. If both lists are large, this can be a slow process, and we might do better by sorting them and trying a more sophisticated method. But this is convenient for anything reasonable-sized.

See 21.5. 21.5. Building lists

Kind: phrase (list of Ks, list of Ks) -> nothing

remove entry (number) from (list of values)

remove entry (number) from (list of values)
optionally if present

This phrase removes the entry at the given position, counting from 1 as the first entry. (Once it is removed, the other entries shuffle down.) Example:

> let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3};
> remove entry 3 from L;

results in L being {3, 1, 1, 5, 9, 2, 6, 5, 3}.

See 21.5. 21.5. Building lists

Kind: phrase (number, list of values) -> nothing

remove entries (number) to (number) from (list of values)

remove entries (number) to (number) from (list of values)
optionally if present

This phrase removes the entries at the given range of positions, counting from 1 as the first entry. (Once they are removed, the other entries shuffle down.) Example:

> let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3};
> remove entries 3 to 6 from L;

results in L being {3, 1, 2, 6, 5, 3}.

See 21.5. 21.5. Building lists

Kind: phrase (number, number, list of values) -> nothing

if (value) is listed in (list of values):

| if (value) is listed in (list of values): This condition is true if the given value, which must be of a compatible kind, is one of those in the list. For instance, if L is our list of the numbers 2, 3, 5, 7 and 11 then 5 is listed in it but 6 is not. See 21.4. 21.4. Testing and iterating over lists Kind: phrase (K, list of Ks) -> truth state |

if (value) is not listed in (list of values):

| if (value) is not listed in (list of values): This condition is true if the given value, which must be of a compatible kind, is not one of those in the list. See 21.4. 21.4. Testing and iterating over lists Kind: phrase (K, list of Ks) -> truth state |

list of (description of values) ... value

| list of (description of values) ... value This phrase produces the list of all values matching the given description. Inform will issue a problem message if the result would be an infinite list, or one which is impractical to test: for instance "list of even numbers" is not feasible. See 21.6. 21.6. Lists of objects Kind: phrase description of Ks -> list of Ks |

multiple object list ... list of objects

multiple object list ... list of objects

This phrase produces the current multiple object list as a value. The list will be the collection of objects found to match a plural noun like ALL in the most recent command typed by the player. If there is no multiple object, say if the command was TAKE PEAR, the list will be empty: it won't be a list of size 1.

See 17.20. 17.20. Multiple action processing

Kind: phrase nothing -> list of objects

alter the multiple object list to (list of objects)

alter the multiple object list to (list of objects)

This phrase sets the multiple object list to the given value. The list is ordinarily the collection of objects found to match a plural noun like ALL in the most recent command typed by the player, but using this phrase at the right moment (before the "generate action rule" in the turn sequence rules takes effect).

See 17.20. 17.20. Multiple action processing

Kind: phrase list of objects -> nothing

Length of lists

number of entries in/of (list of values) ... number

number of entries in/of (list of values) ... number

This phrase produces the number of positions in the list. Example:

> the number of entries in {1, 1, 1, 3, 1}

is 5, even though there are only two genuinely different items in the list.

See 21.9. 21.9. Accessing entries in a list

Kind: phrase list of values -> number

truncate (list of values) to (number) entries/entry

truncate (list of values) to (number) entries/entry

This phrase alters the given list so that it now has no more than the number of entries given. Example:

> truncate L to 8 entries;

shortens L to length 8 if it is currently longer than that, trimming entries from the end, but would (for instance) leave a list of length 3 unchanged. Note that

> truncate L to 0 entries;

empties it to { }, the list with nothing in.

See 21.10. 21.10. Lengthening or shortening a list

Kind: phrase (list of values, number) -> nothing

truncate (list of values) to the first (number) entries/entry

truncate (list of values) to the first (number) entries/entry

This phrase alters the given list so that it now consists only of the initial part of the list with the given length. Example:

> truncate L to the first 4 entries;

turns {1, 3, 5, 7, 9, 11} to {1, 3, 5, 7}.

See 21.10. 21.10. Lengthening or shortening a list

Kind: phrase (list of values, number) -> nothing

truncate (list of values) to the last (number) entries/entry

truncate (list of values) to the last (number) entries/entry

This phrase alters the given list so that it now consists only of the final part of the list with the given length. Example:

> truncate L to the last 4 entries;

turns {1, 3, 5, 7, 9, 11} to {5, 7, 9, 11}.

See 21.10. 21.10. Lengthening or shortening a list

Kind: phrase (list of values, number) -> nothing

extend (list of values) to (number) entries/entry

extend (list of values) to (number) entries/entry

This phrase pads out the list with default values as needed so that it now has at least the given length. (If the list is already at least that length, nothing is done.) Example:

> extend L to 80 entries;

lengthens L to length 80 if it is currently shorter than that.

See 21.10. 21.10. Lengthening or shortening a list

Kind: phrase (list of values, number) -> nothing

change (list of values) to have (number) entries/entry

change (list of values) to have (number) entries/entry

This phrase alters the given list so that it now has exactly the number of entries given. Example:

> change L to have 21 entries;

If L previously had more than 21 entries, they are thrown away (and lost forever); if L previously had fewer, then new entries are created, using the default value for whatever kind of value L holds. So extending a list of numbers will pad it out with 0s, but extending a list of texts will pad it out with the empty text "", and so on.

See 21.10. 21.10. Lengthening or shortening a list

Kind: phrase (list of values, number) -> nothing

Reversing and rotating lists

reverse (list of values)

reverse (list of values)

This phrase puts the list in reverse order. The old entry 1 becomes the new last entry, and so on: reversing an empty list or a list containing only one entry leaves it unchanged. Example:

> let L be {11, 12, 14, 15, 16, 17};
> reverse L;

results in L being {17, 16, 15, 14, 12, 11}.

See 21.8. 21.8. Sorting, reversing and rotating lists

Kind: phrase list of values -> nothing

rotate (list of values)

rotate (list of values)

This phrase shuffles the entries of the list forwards (to the right) by one place, so that the 1st becomes 2nd, the 2nd becomes 3rd, and so on until the last, which becomes the new first entry. Example:

> let L be { "cow", "heifer", "bullock" };
> rotate L;

results in L being { "bullock", "cow", "heifer" }.

See 21.8. 21.8. Sorting, reversing and rotating lists

Kind: phrase list of values -> nothing

rotate (list of values) backwards

rotate (list of values) backwards

This phrase shuffles the entries of the list backwards (to the left) by one place, so that the 3rd becomes 2nd, the 2nd becomes 1st, and so on; the previous 1st entry becomes the new last entry. Example:

> let L be { "cow", "heifer", "bullock" };
> rotate L backwards;

results in L being { "heifer", "bullock", "cow"}. (This achieves the same effect as "reverse L; rotate L; reverse L;" but is a little faster, and a lot less effort to read.)

See 21.8. 21.8. Sorting, reversing and rotating lists

Kind: phrase list of values -> nothing

Sorting lists

sort (list of values)

sort (list of values)

This phrase puts the list into ascending order. Example:

> let L be {6 PM, 11:13 AM, 4:21 PM, 9:01 AM};
> sort L;

results in L being {9:01 AM, 11:13 AM, 4:21 PM, 6 PM}.

See 21.8. 21.8. Sorting, reversing and rotating lists

Kind: phrase list of values -> nothing

sort (list of values) in/into reverse order

sort (list of values) in/into reverse order

This phrase puts the list into descending order. Example:

> let L be {6 PM, 11:13 AM, 4:21 PM, 9:01 AM};
> sort L in reverse order;

results in L being {6 PM, 4:21 PM, 11:13 AM, 9:01 AM}.

See 21.8. 21.8. Sorting, reversing and rotating lists

Kind: phrase list of values -> nothing

sort (list of values) in/into random order

sort (list of values) in/into random order

This phrase puts the list into a uniformly random order, shuffling it as if it were a pack of cards. Example:

> let L be {1, 2, 3, 4, 5, 6};
> sort L in random order;

might result in L being {3, 1, 5, 6, 4, 2}. Or any of 719 other arrangements, including being left as it was.

See 21.8. 21.8. Sorting, reversing and rotating lists

Kind: phrase list of values -> nothing

sort (list of objects) in/into (property) order

sort (list of objects) in/into (property) order

This phrase puts the list into ascending order of the values of the given property for the items in the list; this is only allowed if all of those values do have the property in question. Example:

> let L be the list of people;
> sort L in carrying capacity order;

would arrange people with weaklings first, titans last.

See 21.8. 21.8. Sorting, reversing and rotating lists

Kind: phrase (list of objects, property) -> nothing

sort (list of objects) in/into reverse (property) order

sort (list of objects) in/into reverse (property) order

This phrase puts the list into descending order of the values of the given property for the items in the list; this is only allowed if all of those values do have the property in question. Example:

> let L be the list of people;
> sort L in reverse carrying capacity order;

would arrange people with titans first, weaklings last.

See 21.8. 21.8. Sorting, reversing and rotating lists

Kind: phrase (list of objects, property) -> nothing

Relations

show relation (relation of values)

| show relation (relation of values) This phrase is for testing purposes only. It shows the current state of the named relation, that is, it shows which values relate to which other ones, where it's possible to do this in any sensible way. See 13.7. 13.7. Relations in groups Kind: phrase relation of values -> nothing |

next step via (relation of objects) from (object) to (object) ... object

next step via (relation of objects) from (object) to (object) ... object

This phrase tries to find a shortest route between the two given endpoints, using the given relation of objects to determine single steps. Example:

> next step via the overlooking relation from the Folly to the Chinese Lake

The result is the special object value "nothing" if the two endpoints are the same or if no route exists.

See 13.11. 13.11. Indirect relations

Kind: phrase (relation of objects, object, object) -> object

number of steps via (relation of objects) from (object) to (object) ... number

number of steps via (relation of objects) from (object) to (object) ... number

This phrase tries to find the length of a shortest route between the two given endpoints, using the given relation of objects to determine single steps. Example:

> number of steps via the overlooking relation from the Folly to the Chinese Lake

The result is 0 if the two endpoints are the same, or -1 if no route exists.

See 13.11. 13.11. Indirect relations

Kind: phrase (relation of objects, object, object) -> number

list of (name of kind) that/which/whom (relation of values) relates ... value

list of (name of kind) that/which/whom (relation of values) relates ... value

This phrase produces a list of all X which relate to anything under the given relation. Example: suppose partnership relates various texts to various texts. Then we can obtain

> list of texts which the partnership relation relates

See 13.13. 13.13. Relations involving values

Kind: phrase (K, relation of Ks to Ls) -> list of Ks

list of (name of kind) to which/whom (relation of values) relates ... value

list of (name of kind) that/which/whom (relation of values) relates to ... value

list of (name of kind) to which/whom (relation of values) relates ... value

This phrase produces a list of all Y which anything relates to under the given relation. Example: suppose partnership relates various texts to various texts. Then we can obtain

> list of texts which the partnership relation relates to

See 13.13. 13.13. Relations involving values

Kind: phrase (L, relation of Ks to Ls) -> list of Ls

list of (name of kind) that/which/who relate to (value) by (relation of values) ... value

list of (name of kind) that/which/who relate to (value) by (relation of values) ... value

This phrase produces a list of all the X such that X relates to the given value V by the given relation. Example: suppose partnership relates various texts to various texts. Then we can obtain

> list of texts which relate to "cheese" by the partnership relation

which might be, say, { "chalk", "grapes", "macaroni" }. The answer might be the empty set, but that's not a problem.

See 13.13. 13.13. Relations involving values

Kind: phrase (K, L, relation of Ks to Ls) -> list of Ks

list of (name of kind) to which/whom (value) relates by (relation of values) ... value

list of (name of kind) that/which/whom (value) relates to by (relation of values) ... value

list of (name of kind) to which/whom (value) relates by (relation of values) ... value

This phrase produces a list of all Y such that the given value V relates to Y by the given relation. Example: suppose partnership relates various texts to various texts. Then we can obtain

> list of texts to which "chalk" relates by the partnership relation

which might be, say, { "cheese", "blackboard", "cliffs" }. The answer might be the empty set, but that's not a problem.

See 13.13. 13.13. Relations involving values

Kind: phrase (L, K, relation of Ks to Ls) -> list of Ls

if (name of kind) relates to (value) by (relation of values):

if (name of kind) relates to (value) by (relation of values):

This condition is true if the value V is such that something relates to V by the given relation. Example: suppose partnership relates various texts to various texts. Then we can test

> if a text relates to "cheese" by the partnership relation, ...

See 13.13. 13.13. Relations involving values

Kind: phrase (K, L, relation of Ks to Ls) -> truth state

if (value) relates to (name of kind) by (relation of values):

if (value) relates to (name of kind) by (relation of values):

This condition is true if the value V is such that V relates to something by the given relation. Example: suppose partnership relates various texts to various texts. Then we can test

> if "chalk" relates to a text by the partnership relation, ...

See 13.13. 13.13. Relations involving values

Kind: phrase (K, L, relation of Ks to Ls) -> truth state

(name of kind) that/which/who relates to (value) by (relation of values) ... value

(name of kind) that/which/who relates to (value) by (relation of values) ... value

This phrase produces an X such that X relates to the given value V by the given relation. Example: suppose partnership relates various texts to various texts. Then we can obtain

> the text which relates to "cheese" by the partnership relation

which might be, say, "chalk". It's a run-time problem to use this if no such X exists.

See 13.13. 13.13. Relations involving values

Kind: phrase (K, L, relation of Ks to Ls) -> K

(name of kind) to which/whom (value) relates by (relation of values) ... value

(name of kind) that/which/whom (value) relates to by (relation of values) ... value

(name of kind) to which/whom (value) relates by (relation of values) ... value

This phrase produces an Y such that the given value V relates to Y by the given relation. Example: suppose partnership relates various texts to various texts. Then we can obtain

> the text to which "chalk" relates by the partnership relation

which might be, say, "cheese". It's a run-time problem to use this if no such Y exists.

See 13.13. 13.13. Relations involving values

Kind: phrase (L, K, relation of Ks to Ls) -> L

Functional programming

if (value) matches (description of values):

if (value) matches (description of values):

This condition is true if the value matches the description; the kinds must be compatible, or Inform will issue a problem message. There is no point using this for cases where the description is given explicitly:

> if 4 matches even numbers, ...

because it is easier to write just:

> if 4 is an even number, ...

So this condition is only useful when the description is stored in some variable, and its identity is not known.

See 22.2. 22.2. Descriptions as values

Kind: phrase (K, description of Ks) -> truth state

(phrase nothing -> value) applied ... value

| (phrase nothing -> value) applied ... value This phrase produces the result of applying the given phrase, which must be one which takes no values itself. See 22.3. 22.3. Phrases as values Kind: phrase phrase nothing -> K -> K |

(phrase value -> value) applied to (value) ... value

| (phrase value -> value) applied to (value) ... value This phrase produces the result of applying the given phrase, which must be one which takes one value itself. See 22.3. 22.3. Phrases as values Kind: phrase (phrase K -> L, K) -> L |

(phrase (value, value) -> value) applied to (value) and (value) ... value

| (phrase (value, value) -> value) applied to (value) and (value) ... value This phrase produces the result of applying the given phrase, which must be one which takes two values itself. See 22.3. 22.3. Phrases as values Kind: phrase (phrase (K, L) -> M, K, L) -> M |

(phrase (value, value, value) -> value) applied to (value) and (value) and (value) ... value

| (phrase (value, value, value) -> value) applied to (value) and (value) and (value) ... value This phrase produces the result of applying the given phrase, which must be one which takes three values itself. See 22.3. 22.3. Phrases as values Kind: phrase (phrase (K, L, M) -> N, K, L, M) -> N |

apply (phrase nothing -> nothing)

| apply (phrase nothing -> nothing) This phrase causes the given phrase to be applied. It must be one which takes no values itself. See 22.3. 22.3. Phrases as values Kind: phrase phrase nothing -> nothing -> nothing |

apply (phrase value -> nothing) to (value)

| apply (phrase value -> nothing) to (value) This phrase causes the given phrase to be applied. It must be one which takes one value itself. See 22.3. 22.3. Phrases as values Kind: phrase (phrase K -> nothing, K) -> nothing |

apply (phrase (value, value) -> nothing) to (value) and (value)

| apply (phrase (value, value) -> nothing) to (value) and (value) This phrase causes the given phrase to be applied. It must be one which takes two values itself. See 22.3. 22.3. Phrases as values Kind: phrase (phrase (K, L) -> nothing, K, L) -> nothing |

apply (phrase (value, value, value) -> nothing) to (value) and (value) and (value)

| apply (phrase (value, value, value) -> nothing) to (value) and (value) and (value) This phrase causes the given phrase to be applied. It must be one which takes three values itself. See 22.3. 22.3. Phrases as values Kind: phrase (phrase (K, L, M) -> nothing, K, L, M) -> nothing |

(phrase value -> value) applied to (list of values) ... value

(phrase value -> value) applied to (list of values) ... value

This phrase takes the list, applies the phrase to each entry in the list, and forms a new list of the result. Example:

> To decide what number is double (N - a number) (this is doubling):
> decide on N plus N.

Then "doubling applied to 2" produces 4, by the simpler definition of "applied to", but also:

> doubling applied to {2, 3, 4}

produces the list {4, 6, 8}.

See 22.5. 22.5. Map, filter and reduce

Kind: phrase (phrase K -> L, list of Ks) -> list of Ls

(phrase (value, value) -> value) reduction of (list of values) ... value

(phrase (value, value) -> value) reduction of (list of values) ... value

This phrase works through the list and accumulates the values in it, using the phrase supplied. Example: if we have

> To decide what number is the sum of (N - number) and (M - number)
> (this is summing):
> decide on N + M.

then the summing reduction of {3, 8, 4, 19, 7} is the number 41, obtained by

> (((3 + 8) + 4) + 19) + 7

so that the summing phrase has been used four times.

See 22.5. 22.5. Map, filter and reduce

Kind: phrase (phrase (K, K) -> K, list of Ks) -> K

filter to (description of values) of (list of values) ... value

filter to (description of values) of (list of values) ... value

This phrase produces a new list which is a thinner version of the one given, so that it contains only those values which match the description given. Example:

> filter to even numbers of {3, 8, 4, 19, 7}

produces {8, 4}, with the values 3, 19, and 7 failing to make it through. A sufficiently fine filter may well thin out a list to a single entry, or even no entries at all, but the result is always a list.

See 22.5. 22.5. Map, filter and reduce

Kind: phrase (description of Ks, list of Ks) -> list of Ks

showme (value)

showme (value)

This phrase is intended for testing purposes only. If used in a story file running inside the Inform application, it prints a line of text showing the given value and its kind; in a Released story file, it does nothing at all. Example:

> When play begins: showme 11.

produces

> number: 11

More usefully:

> Every turn: showme the score.

Now, every turn, we get a line in the story's transcript like so:

> "score" = number: 0

Inform uses the quotation marks and equals sign to show that it had to do some work to find the answer. "score" wasn't a constant value - it was a variable, and Inform had to look up the current value.

See 11.4. 11.4. The showme phrase

Kind: phrase value -> nothing

default value of (name of kind) ... value

default value of (name of kind) ... value

Produces the default value of the kind named. Examples:

> The silver repeater is here. "You catch sight of a silver repeater watch, hands immobile at [default value of time]."

produces the output:

> You catch sight of a silver repeater watch, hands immobile at 9:00 am.

because nine in the morning is the default time in Inform. If we have:

> Brightness is a kind of value. The brightnesses are guttering, weak, radiant and blazing.

then "default value of brightness" is guttering, the first brightness created. When it comes to kinds of object, we sometimes have to be a little careful. For example,

> default value of room

is always going to be fine (it's always the first room created in the source text). But

> default value of vehicle

would produce a Problem message if there were no vehicles in the world.

See 4.11. 4.11. Default values of kinds

Kind: phrase K -> K

Files (for Glulx external files language element only)

read (external file) into (table name)

read (external file) into (table name)

This phrase causes the entire contents of the given table to be read in from the given file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

> read File of Glaciation Data into the Table of Antarctic Reserves

Any rows left spare at the foot of the table are automatically blanked. On the other hand if the file is too large to fit into the table - with too many columns or too many rows - a run-time problem is produced.

See 23.13. 23.13. Writing and reading tables to external files

Kind: phrase (external file, table name) -> nothing

write (external file) from (table name)

write (external file) from (table name)

This phrase causes the entire contents of the given table to be written out to the given file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

> write File of Glaciation Data from the Table of Antarctic Reserves

Any blank rows in the table are automatically moved to the bottom, and only the non-blank rows are written.

See 23.13. 23.13. Writing and reading tables to external files

Kind: phrase (external file, table name) -> nothing

if (external file) exists:

if (external file) exists:

This condition is true if the file-system used by the player appears to contain a file with the right name. For example, if we declared:

> The binary File of Glaciation Data is called "icedata".

and then tested

> if the File of Glaciation Data exists, ...

then Inform would search for a file called "icedata". (The arrangements for where this might be stored, and its filename extension, vary from platform to platform.)

See 23.13. 23.13. Writing and reading tables to external files

Kind: phrase external file -> truth state

if ready to read (external file):

if ready to read (external file):

This condition is true if the file exists and is marked as being ready to read; that is, it is not in a state where another program is currently writing it. Example:

> if ready to read the file of Invariants, ...

See 23.15. 23.15. Exchanging files with other programs

Kind: phrase external file -> truth state

mark (external file) as ready to read

mark (external file) as ready to read

This phrase marks that we have finished writing to the given file, so that any external program is welcome to read it now. Example:

> mark the file of Invariants as ready to read;

See 23.15. 23.15. Exchanging files with other programs

Kind: phrase external file -> nothing

mark (external file) as not ready to read

mark (external file) as not ready to read

This phrase marks that we are about to start writing to the given file, so that any external program should wait until we're finished if it wants to read the file. Example:

> mark the file of Invariants as not ready to read;

See 23.15. 23.15. Exchanging files with other programs

Kind: phrase external file -> nothing

write (text) to (external file)

write (text) to (external file)

This phrase makes the given text become the entire contents of the named file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

> write "Jackdaws love my big sphinx of quartz." to the file of Abecedary Wisdom;

See 23.14. 23.14. Writing, reading and appending text to files

Kind: phrase (text, external file) -> nothing

append (text) to (external file)

append (text) to (external file)

This phrase adds the given text to the end of the current contents of the named file (creating it if it does not exist on disc). Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

> append "Jinxed wizards pluck ivy from the big quilt." to the file of Abecedary Wisdom;

See 23.14. 23.14. Writing, reading and appending text to files

Kind: phrase (text, external file) -> nothing

say "[text of external file]"

say "[text of external file]"

This text expands to the contents of the named file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

> "[text of the File of Abecedary Wisdom]"

See 23.14. 23.14. Writing, reading and appending text to files

Figures (for figures language element only)

display (figure name)

display (figure name)
optionally one time only

This phrase causes the figure to be displayed in a way visible to the player. If the option "one time only" is used, it will have no effect if the figure has been displayed before. Example:

> display the Figure of Woodlands;

See 23.6. 23.6. Displaying the figures

Kind: phrase figure name -> nothing

Glulx resource ID of (figure name) ... number

| Glulx resource ID of (figure name) ... number This phrase produces the ID number used in the eventual Glulx file for the given figure. See 23.10. 23.10. Some technicalities about figures and sounds Kind: phrase figure name -> number |

Sound effects (for sounds language element only)

play (sound name)

play (sound name)
optionally one time only

This phrase causes the sound effect to be played. If the option "one time only" is used, it will have no effect if the sound effect has been played before. Example:

> play the sound of rustling leaves;

See 23.8. 23.8. Declaring and playing back sounds

Kind: phrase sound name -> nothing

Glulx resource ID of (sound name) ... number

| Glulx resource ID of (sound name) ... number This phrase produces the ID number used in the eventual Glulx file for the given sound effect. See 23.10. 23.10. Some technicalities about figures and sounds Kind: phrase sound name -> number |

Control phrases

If and unless

if (a condition):

if (a condition):

This phrase causes the single phrase, or block of phrases, following it to be obeyed only if the condition is true. (If the condition must contain a comma for some reason, the block form should be used.) Example:

> if the red door is open, say "You could try going east?"

See 11.6. 11.6. If

Kind: phrase nothing -> nothing

unless (a condition):

unless (a condition):

This phrase causes the single phrase, or block of phrases, following it to be obeyed only if the condition is false. (If the condition must contain a comma for some reason, the block form should be used.) Example:

> unless the red door is closed, say "You could try going east?"

See 11.6. 11.6. If

Kind: phrase nothing -> nothing

if (value) is:

if (value) is:

This phrase switches between a variety of possible blocks of phrases to follow, depending on the value given. Example:

> if the dangerous item is:
> -- the electric hairbrush:
> say "Mind your head.";
> -- the silver spoon:
> say "Steer clear of the cutlery drawer."

One alternative is allowed to be "otherwise", which is used only if none of the other cases apply, and which therefore guarantees that in any situation exactly one of the blocks will be followed.

> if N is:
> -- 1: say "1.";
> -- 2: say "2.";
> -- otherwise: say "Neither 1 nor 2.";

See 11.8. 11.8. Otherwise

Kind: phrase value -> nothing

While

while (a condition):

while (a condition):

This phrase causes the block of phrases following it to be repeated over and over for as long the condition is true. If it isn't even true the first time, the block is skipped over and nothing happens. Example:

> while someone (called the victim) is in the Crypt:
> say "A bolt of lightning strikes [the victim]!";
> now the victim is in the Afterlife;

See 11.9. 11.9. While

Kind: phrase nothing -> nothing

Repeat

repeat with (a new name) running from (arithmetic value) to (arithmetic value):

repeat with (a new name) running from (enumerated value) to (enumerated value):

repeat with (a new name) running from (arithmetic value) to (arithmetic value):

This phrase causes the block of phrases following it to be repeated once for each value in the given range, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

> repeat with counter running from 1 to 10:
> ...

This, and runs through the given phrases ten times. Within those phrases, a special value called "counter" has the value 1 the first time through, then the value 2, then 3 and so on up to 10. (It can of course be called whatever we like: this is only an example.) The range can be from any kind where ranges make sense - anything on which arithmetic can be done, so for instance

> repeat with moment running from 4 PM to 4:07 PM:
> ...

and also any enumeration:

> Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet.

> ...
> repeat with hue running from orange to indigo:
> ...

See 11.10. 11.10. Repeat

Kind: phrase (K, K [arithmetic value], K) -> nothing

repeat with (a new name) running through (description of values):

repeat with (a new name) running through (description of values):

This phrase causes the block of phrases following it to be repeated once for each value matching the description, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

> repeat with item running through open containers:
> ...

If there are no containers, or they are all closed, the phrases will not be followed at all. Inform will issue a Problem message if the range of the loop may be infinite: for example, it won't allow:

> repeat with X running through odd numbers:
> ...

On the other hand it will allow:

> repeat with T running through times:
> ...

which repeats 1440 times, starting with T at midnight and finishing at 11:59 PM. See the Kinds index for which kinds of value can be repeated through.

See 11.11. 11.11. Repeat running through

Kind: phrase (K, description of Ks) -> nothing

repeat with (a new name) running through (list of values):

repeat with (a new name) running through (list of values):

This phrase causes the block of phrases following it to be repeated once for each item in the given list, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

> let L be {2, 3, 5, 7, 11, 13, 17, 19};
> repeat with prime running through L:
> ...

If the list is empty, nothing happens: the "..." phrase(s) are never tried.

See 21.4. 21.4. Testing and iterating over lists

Kind: phrase (object, list of values) -> nothing

repeat through (table name):

repeat through (table name):

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, from top to bottom. Blank rows are skipped. Example:

> To list the succession:
> say "The Succession List runs as follows...";
> repeat through the Table of Recent Monarchs:
> say "[accession entry]: [name entry] ([family entry])."

See 16.6. 16.6. Repeating through tables

Kind: phrase table name -> nothing

repeat through (table name) in reverse order:

| repeat through (table name) in reverse order: This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, from bottom to top. Blank rows are skipped. See 16.6. 16.6. Repeating through tables Kind: phrase table name -> nothing |

repeat through (table name) in (table column) order:

repeat through (table name) in (table column) order:

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, in order of the values in the given column. Blank rows are skipped. Example:

> repeat through the Table of Recent Monarchs in name order: ...
> repeat through the Table of Recent Monarchs in accession order: ...

work through the same table in rather different orders. The sequence is lower to higher (small numbers to high numbers, A to Z, and so on); insert "reverse" after "in" to reverse this.

See 16.6. 16.6. Repeating through tables

Kind: phrase (table name, table column) -> nothing

repeat through (table name) in reverse (table column) order:

repeat through (table name) in reverse (table column) order:

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, in order of the values in the given column. Blank rows are skipped. Example:

> repeat through the Table of Recent Monarchs in reverse name order: ...
> repeat through the Table of Recent Monarchs in reverse accession order: ...

work through the same table in rather different orders. The sequence is higher to lower (high numbers to small numbers, Z to A, and so on); delete the "reverse" after "in" to reverse this.

See 16.6. 16.6. Repeating through tables

Kind: phrase (table name, table column) -> nothing

Changing the flow of loops

break

break

This phrase can only be used inside "repeat", "while" block, and causes both the current repetition and the entire loop to finish immediately. Example:

> repeat with X running from 1 to 10:
> if X is 7, break;
> say "[X] ".

produces the text "1 2 3 4 5 6 ", with nothing after "6" because the loop was broken at that point. The "say" wasn't reached on the 7th repetition, and the 8th, 9th and 10th never happened.

See 11.12. 11.12. Next and break

Kind: phrase nothing -> nothing

next

next

This phrase can only be used inside a "repeat" or "while" block, and causes the current repetition of the block to finish immediately. That either means the next repetition begins, or (if we are already at the last one) the loop ends too. Example:

> repeat with X running from 1 to 10:
> if X is 4, next;
> say "[X] ".

produces the text "1 2 3 5 6 7 8 9 10 ", with no "4" because the "say" phrase was never reached on the fourth repetition.

See 11.12. 11.12. Next and break

Kind: phrase nothing -> nothing

Deciding outcomes

yes

decide yes

| yes This phrase can only be used in the definition of a phrase to decide whether a condition holds. It ends the decision process immediately and makes the condition true. See 11.16. 11.16. New conditions, new adjectives Kind: phrase nothing -> nothing |

no

decide no

| no This phrase can only be used in the definition of a phrase to decide whether a condition holds. It ends the decision process immediately and makes the condition false. See 11.16. 11.16. New conditions, new adjectives Kind: phrase nothing -> nothing |

decide on (value)

decide on (value)

This phrase can only be used in the body of a definition of a phrase to decide a value. It causes the calculation to end immediately, with the outcome being the given value, which must be of the kind expected. Example:

> To decide which number is double (N - a number):
> let D be N times N;
> decide on D.

See 11.17. 11.17. Phrases to decide other things

Kind: phrase value -> nothing

Stop or go

do nothing

do nothing

This phrase does nothing at all. It is very occasionally useful to make a rule which does nothing:

> This is the largely ineffective rule:
> do nothing.

See 11.1. 11.1. What are phrases?

Kind: phrase nothing -> nothing

stop

stop

This phrase causes the current rule to end immediately. It is most often used in the definition of other phrases:

> To judge the score:
> if the score is 0, stop;
> say "The score is [score in words] more than it was a half-hour ago."

In the case when the score is 0, the "stop" ends the phrase immediately, so that the subsequent text is printed only if the score is not 0.

"Stop" can also be used in action rules, though this is not very good style - it's clearer to use "stop the action", which is exactly equivalent.

See 11.13. 11.13. Stop

Kind: phrase nothing -> nothing

Actions, activities and rules

Trying actions

try (action)

try (action)

This phrase makes the action, which has to be named literally, take effect now. Example:

> Instead of entering the trapdoor, try going up.

It's as if the player had typed GO UP as a command. Note that the action has to be specific:

> try eating something;

is not allowed, since it doesn't say exactly what is to be eaten.

See 7.4. 7.4. Try and try silently

Kind: phrase action -> nothing

silently try (action)

try silently (action)

silently try (action)

This phrase makes the action, which has to be named literally, take effect now, under the "silent" convention which means that routine messages aren't printed. Example:

> try silently taking the napkin;

Silence is maintained only if this new action, the taking of the napkin, is successful (so if the napkin is successfully taken, the text "Taken." will not appear): if the action should fail, a suitable objection will be voiced as usual.

See 7.4. 7.4. Try and try silently

Kind: phrase action -> nothing

if action is not silent:

| if action is not silent: Kind: phrase nothing -> truth state |

Action requirements

if action requires a touchable noun:

| if action requires a touchable noun: This condition is true if the action being processed is one whose (first) noun is an object which needs to be touchable by the actor. For example, it's true for "taking", but false for "examining". See 12.7. 12.7. New actions Kind: phrase nothing -> truth state |

if action requires a touchable second noun:

| if action requires a touchable second noun: This condition is true if the action being processed is one whose second noun is an object which needs to be touchable by the actor. For example, it's true for "putting the brick in the sack", but false for "throwing the brick at the window". See 12.7. 12.7. New actions Kind: phrase nothing -> truth state |

if action requires a carried noun:

| if action requires a carried noun: This condition is true if the action being processed is one whose (first) noun is an object which needs to be carried by the actor. For example, it's true for "dropping", but false for "taking". See 12.7. 12.7. New actions Kind: phrase nothing -> truth state |

if action requires a carried second noun:

| if action requires a carried second noun: This condition is true if the action being processed is one whose second noun is an object which needs to be carried by the actor. See 12.7. 12.7. New actions Kind: phrase nothing -> truth state |

if action requires light:

| if action requires light: This condition is true if the action being processed is one which can only be performed if the actor has light to see by. For example, it's true for "examining", but false for "dropping". See 12.7. 12.7. New actions Kind: phrase nothing -> truth state |

Stop or continue

stop the action

stop the action

This phrase stops the current rule, stops the rulebook being worked through, and finally stops the action being processed. Example:

> Before taking the key:
> say "It seems to be soldered to the keyhole.";
> stop the action.

See 7.3. 7.3. Before rules

Kind: phrase nothing -> nothing

continue the action

continue the action

This phrase ends the current rule, but in a way which keeps its rulebook going, so that the action being processed will carry on rather than being stopped. Example:

> Instead of taking the napkin:
> say "(first unfolding its delicate origami swan)[command clarification break]";
> continue the action.

An "instead" rule ordinarily stops the action when it finishes, so the "continue the action" is needed to make things carry on. (This rule would have been better written as a "before" rule, in fact, but it shows the idea.)

See 7.3. 7.3. Before rules

Kind: phrase nothing -> nothing

Actions as values

current action ... action

current action ... action

This phrase produces the action currently being processed as a value - it literally stores the action, and remembers, if necessary, the exact wording of the player's command at the time it was stored - so that even actions arising from commands like LOOK UP X100 IN THE CODE BOOK can be stored faithfully. Examples:

> let the present whim be the current action;
> say "How you would like to be [current action].";

This only makes sense if an action is currently going on, so it shouldn't be used in "every turn" rules, for instance.

See 12.20. 12.20. Stored actions

Kind: phrase nothing -> action

action of (action) ... action

action of (action) ... action

This phrase is now seldom needed. It produces a literally typed action as a value. Example:

> now the best idea yet is the action of pushing the button;

Nowadays in most contexts we can just type "pushing the button" as a value, and that will work fine, so this phrase is retained only to keep old code working.

See 12.20. 12.20. Stored actions

Kind: phrase action -> action

if (action) involves (object):

if (action) involves (object):

This condition is true if the object appears as any of the actor, the noun or the second noun in the action. Example:

> if the current action involves Algy

would be true for "give revolver to Algy", "Algy trying flying the Sopwith Camel", "examine Algy" and so on, but false for "ask Raymond about secret airfield".

See 12.20. 12.20. Stored actions

Kind: phrase (action, object) -> truth state

action name part of (action) ... action name

action name part of (action) ... action name

This phrase produces the action name part of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

> action name part of the current action = throwing it at action

See 12.20. 12.20. Stored actions

Kind: phrase action -> action name

noun part of (action) ... object

noun part of (action) ... object

This phrase produces the (first) noun of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

> noun part of the current action = the brick

If the noun is something other than an object, this produces just "nothing", the non-object.

See 12.20. 12.20. Stored actions

Kind: phrase action -> object

second noun part of (action) ... object

second noun part of (action) ... object

This phrase produces the second noun of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

> second noun part of the current action = Biggles

If the second noun is something other than an object (for instance for the command SET DIAL TO 3417 it would be the number 3417), this produces just "nothing", the non-object.

See 12.20. 12.20. Stored actions

Kind: phrase action -> object

actor part of (action) ... object

actor part of (action) ... object

This phrase produces the person who would be carrying out the action if it were being tried. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

> actor part of the current action = Algy

See 12.20. 12.20. Stored actions

Kind: phrase action -> object

Carrying out activities

carry out the (activity) activity

carry out the (activity) activity

This phrase carries out the given activity, which must be one not applying to any value. Example:

> carry out the assaying activity;

See 18.5. 18.5. New activities

Kind: phrase activity -> nothing

carry out the (activity on values) activity with (value)

carry out the (activity on values) activity with (value)

This phrase carries out the given activity, which must apply to a kind of value matching the one supplied. Example:

> carry out the analysing activity with the pitchblende;
> carry out the announcing activity with the score;

See 18.5. 18.5. New activities

Kind: phrase (activity on Ks, K) -> nothing

continue the activity

continue the activity

This phrase should be used only in rules in activity rulebooks. It causes the current rule to end, but without result, so that the activity continues rather than stopping as a result of the rule. This is useful for rulebooks (like the "for" rulebook of an activity) where the default is that a rule does stop the activity.

See 18.5. 18.5. New activities

Kind: phrase nothing -> nothing

Advanced activities

begin the (activity) activity

begin the (activity) activity

This phrase causes the named activity to become active, and runs its "before" rulebook. The activity must be one which applies to nothing. Example:

> begin the assaying activity;

In all cases a matching "end the ... activity" or else "abandon the ... activity" phrase must be reached.

See 18.7. 18.7. Beginning and ending activities manually

Kind: phrase activity -> nothing

begin the (activity on values) activity with (value)

begin the (activity on values) activity with (value)

This phrase causes the named activity to become active, and runs its "before" rulebook. The activity must be one which applies to a value of a matching kind. Example:

> begin the analysing activity with the pitchblende;

In all cases a matching "end the ... activity with ..." or else "abandon the ... activity with..." phrase must be reached.

See 18.7. 18.7. Beginning and ending activities manually

Kind: phrase (activity on Ks, K) -> nothing

if handling (activity on values) activity:

if handling (activity on values) activity:

This should be used only where the given activity has been started with "begin ..." and will be finished with "end ...". It runs the "for" rules for the activity, and then comes out true if none of those for rules intervened in the handling of that activity. (The activity must be one which doesn't apply to any value.)

See 18.7. 18.7. Beginning and ending activities manually

Kind: phrase activity on values -> truth state

if handling (activity on values) activity with (value):

if handling (activity on values) activity with (value):

This should be used only where the given activity has been started with "begin ..." and will be finished with "end ...". It runs the "for" rules for the activity, and then comes out true if none of those for rules intervened in the handling of that activity. (The given value must be the one it is being applied to.)

See 18.7. 18.7. Beginning and ending activities manually

Kind: phrase (activity on Ks, K) -> truth state

end the (activity) activity

end the (activity) activity

This phrase runs the "after" rulebook of the activity and then causes it to become inactive. The activity must be one which applies to nothing. Example:

> end the assaying activity;

This must only happen to match an earlier "begin the ... activity" phrase.

See 18.7. 18.7. Beginning and ending activities manually

Kind: phrase activity -> nothing

end the (activity on values) activity with (value)

end the (activity on values) activity with (value)

This phrase runs the "after" rulebook of the activity and then causes it to become inactive. The activity must be one which applies to a value of a matching kind. Example:

> end the analysing activity with the pitchblende;

This must only happen to match an earlier "begin the ... activity with..." phrase.

See 18.7. 18.7. Beginning and ending activities manually

Kind: phrase (activity on Ks, K) -> nothing

abandon the (activity) activity

abandon the (activity) activity

This phrase ends an activity at once (without consulting any further rulebooks, including its "after" rulebook). It can only be used with an activity which has had its "begin" but not yet its "end" phrase; it is a drastic remedy best taken only if it is clear that circumstances have changed so that the activity now seems inappropriate. It must not be used during one of the rules for the activity: it can only be used between the begin and for stages, or between the for and end stages.

> abandon the assaying activity;

See 18.7. 18.7. Beginning and ending activities manually

Kind: phrase activity -> nothing

abandon the (activity on values) activity with (value)

abandon the (activity on values) activity with (value)

This phrase ends an activity at once (without consulting any further rulebooks, including its "after" rulebook). It can only be used with an activity which has had its "begin" but not yet its "end" phrase; it is a drastic remedy best taken only if it is clear that circumstances have changed so that the activity now seems inappropriate. It must not be used during one of the rules for the activity: it can only be used between the begin and for stages, or between the for and end stages.

> abandon the analysing activity with the pitchblende;

See 18.7. 18.7. Beginning and ending activities manually

Kind: phrase (activity on Ks, K) -> nothing

Following rules

follow (rule)

follow (rule)

This phrase causes the rule to be obeyed immediately (rather than simply at predetermined times such as when a particular action is being tried, or at the end of every turn, and such). Example:

> follow the advance time rule;
> follow the appraisal rulebook;

See 19.8. 19.8. New rulebooks

Kind: phrase rule -> nothing

follow (values based rule producing values) for (value)

follow (values based rule producing values) for (value)

This phrase causes the rule to be obeyed immediately (rather than simply at predetermined times such as when a particular action is being tried, or at the end of every turn, and such), and applies it to the value given, which must be of a matching kind. Example:

> follow the reaching inside rulebook for the electrified cage;

See 19.9. 19.9. Basis of a rulebook

Kind: phrase (Ks based rule producing values, K) -> nothing

follow (nothing based rule)

follow (nothing based rule)

This phrase causes the rule to be obeyed immediately (rather than simply at predetermined times such as when a particular action is being tried, or at the end of every turn, and such). Example:

> follow the advance time rule;
> follow the appraisal rulebook;

See 19.8. 19.8. New rulebooks

Kind: phrase nothing based rule -> nothing

(name of kind) produced by (rule producing values) ... value

| (name of kind) produced by (rule producing values) ... value This phrase is used to follow the named rule, and to collect the resulting value. See 19.13. 19.13. Rulebooks producing values Kind: phrase (K, rule producing Ks) -> K |

(name of kind) produced by (values based rule producing values) for (value) ... value

| (name of kind) produced by (values based rule producing values) for (value) ... value This phrase is used to follow the named rule based on the value given, and to collect the resulting value. See 19.13. 19.13. Rulebooks producing values Kind: phrase (L, Ks based rule producing Ls, K) -> L |

(name of kind) produced by (nothing based rule producing values) ... value

| (name of kind) produced by (nothing based rule producing values) ... value This phrase is used to follow the named rule, and to collect the resulting value. See 19.13. 19.13. Rulebooks producing values Kind: phrase (K, nothing based rule producing Ks) -> K |

abide by (rule)

abide by (rule)

This phrase applies the given rule, and makes its result the result of the present rule. If the rule being abided by succeeds or fails then the original rule also stops, at once and without going on to any further instructions. Example:

> The omnibus rule:
> abide by the first rule;
> abide by the second rule;
> abide by the third rule;
> abide by the fourth rule.

This duplicates the effect of a rulebook of four rules: the "omnibus rule" tries each in turn, and stops as soon as any of them stop.

See 19.14. 19.14. Abide by

Kind: phrase rule -> nothing

abide by (values based rule producing values) for (value)

| abide by (values based rule producing values) for (value) This phrase applies the given rule to the given value, and makes its result the result of the present rule. If the rule being abided by succeeds or fails then the original rule also stops, at once and without going on to any further instructions. See 19.14. 19.14. Abide by Kind: phrase (Ks based rule producing values, K) -> nothing |

abide by (nothing based rule)

abide by (nothing based rule)

This phrase applies the given rule, and makes its result the result of the present rule. If the rule being abided by succeeds or fails then the original rule also stops, at once and without going on to any further instructions. Example:

> The omnibus rule:
> abide by the first rule;
> abide by the second rule;
> abide by the third rule;
> abide by the fourth rule.

This duplicates the effect of a rulebook of four rules: the "omnibus rule" tries each in turn, and stops as soon as any of them stop.

See 19.14. 19.14. Abide by

Kind: phrase nothing based rule -> nothing

anonymously abide by (rule)

anonymously abide by (values based rule producing values) for (value)

anonymously abide by (nothing based rule)

anonymously abide by (rule)

This phrase applies the given rule, and makes its result the result of the present rule. If the rule being abided by succeeds or fails then the original rule also stops, at once and without going on to any further instructions. However, the rule deemed to have decided the outcome is the one abided by, not the one doing the abiding.

See 19.14. 19.14. Abide by

Kind: phrase rule -> nothing

Success and failure

make no decision

| make no decision This causes the current rule to end immediately, but with no outcome. That means the rulebook being worked through will continue to run on, beginning with the next rule. See 19.11. 19.11. Success and failure Kind: phrase nothing -> nothing |

rule succeeds

| rule succeeds This causes the current rule to end immediately, with its outcome considered to be a success. The rulebook being worked through also ends, and is also a success. See 19.11. 19.11. Success and failure Kind: phrase nothing -> nothing |

rule fails

| rule fails This causes the current rule to end immediately, with its outcome considered to be a failure. The rulebook being worked through also ends, and is also a failure. See 19.11. 19.11. Success and failure Kind: phrase nothing -> nothing |

rule succeeds with result (value)

| rule succeeds with result (value) This phrase can only be used in a rule which produces a value, and the value given must be of the right kind. It causes the current rule to finish immediately, to succeed, and to produce the value given. See 19.13. 19.13. Rulebooks producing values Kind: phrase value -> nothing |

if rule succeeded:

if rule succeeded:

This condition is true if the most recently followed rule or rulebook ended in success. Example:

> follow the hypothetical clever rule;
> if rule succeeded:
> ...

See 19.11. 19.11. Success and failure

Kind: phrase nothing -> truth state

if rule failed:

if rule failed:

This condition is true if the most recently followed rule or rulebook ended in failure. Example:

> follow the hypothetical clever rule;
> if rule failed:
> ...

Note that this is not the opposite of "rule succeeded", because there's a third possibility: that it ended with no outcome.

See 19.11. 19.11. Success and failure

Kind: phrase nothing -> truth state

outcome of the rulebook ... rulebook outcome

outcome of the rulebook ... rulebook outcome

This phrase produces the (named) outcome of the phrase most recently followed. Example:

> follow the audibility rules;
> if the outcome of the rulebook is the absolute silence outcome:
> say "You could hear a pin drop in here."

See 19.12. 19.12. Named outcomes

Kind: phrase nothing -> rulebook outcome

Model world

Ending the story

end the story

| end the story This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message "The End." The end is not considered final. See 9.4. 9.4. When play ends Kind: phrase nothing -> nothing |

end the story finally

| end the story finally This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message "The End." The end is considered final, and any hidden menu options will be revealed. See 9.4. 9.4. When play ends Kind: phrase nothing -> nothing |

end the story saying (text)

end the story saying (text)

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message given in the text. The end is not considered final. Example:

> end the story saying "You have been stymied"

See 9.4. 9.4. When play ends

Kind: phrase text -> nothing

end the story finally saying (text)

end the story finally saying (text)

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message given in the text. The end is considered final, and any hidden menu options will be revealed. Example:

> end the story finally saying "You have defeated Sauron"

See 9.4. 9.4. When play ends

Kind: phrase text -> nothing

if story has ended:

| if story has ended: This condition is true if an end has been declared using one of the "end the story..." phrases. See 9.4. 9.4. When play ends Kind: phrase nothing -> truth state |

if story has ended finally:

| if story has ended finally: This condition is true if an end has been declared using one of the "end the story finally..." phrases, so that an ending has been reached which the author feels is a completion of the player's experience. See 9.4. 9.4. When play ends Kind: phrase nothing -> truth state |

if story has not ended:

| if story has not ended: This condition is true if no end has been declared using one of the "end the story..." phrases. See 9.4. 9.4. When play ends Kind: phrase nothing -> truth state |

if story has not ended finally:

| if story has not ended finally: This condition is true if an end has been declared using one of the "end the story..." phrases, but not "finally", so the author feels that the player can get further experience by playing again and trying different approaches. See 9.4. 9.4. When play ends Kind: phrase nothing -> truth state |

resume the story

resume the story

This phrase causes an ended story to resume exactly as if no "end the story..." phrase had been used. Example:

> When play ends:
> if the story has not ended finally:
> say "Oh dear. Still, here's another chance.";
> resume the story.

The phrase is likely to be sensible only as part of a "when play ends" rule. Other traditional uses include giving the player three lives, as in an old-school arcade machine.

See 9.4. 9.4. When play ends

Kind: phrase nothing -> nothing

Times of day

minutes part of (time) ... number

minutes part of (time) ... number

This phrase converts a time to a number, then takes the result mod 60, which in effect produces the number of minutes after the hours are thrown away. Example:

> minutes part of 12:41 PM

produces 41.

See 9.10. 9.10. Calculating times

Kind: phrase time -> number

hours part of (time) ... number

hours part of (time) ... number

This phrase converts a time to a number, then divides the result by 60, which in effect produces the number of hours after minutes are thrown away. Example:

> hours part of 8:21 AM

produces 8.

See 9.10. 9.10. Calculating times

Kind: phrase time -> number

if (time) is before (time):

if (time) is before (time):

This condition is true if the first time occurs earlier in the day than the second. In recognition of the fact that very few stories begin before 4 AM, whereas many run on past midnight, the start of the day is taken to be 4 AM: thus 3:59 AM is after 11:10 PM, but 4:04 AM is before it.

See 9.9. 9.9. Comparing and shifting times

Kind: phrase (time, time) -> truth state

if (time) is after (time):

| if (time) is after (time): This condition is true if the first time occurs later in the day than the second. In recognition of the fact that very few stories begin before 4 AM, whereas many run on past midnight, the start of the day is taken to be 4 AM: thus 3:59 AM is after 11:10 PM, but 4:04 AM is before it. See 9.9. 9.9. Comparing and shifting times Kind: phrase (time, time) -> truth state |

(time) before (time) ... time

(time) before (time) ... time

This phrase produces a time earlier by the amount given, keeping within the 24 hour clock. Example:

> 7 hours before 5:30 AM

produces 10:30 PM.

See 9.9. 9.9. Comparing and shifting times

Kind: phrase (time, time) -> time

(time) after (time) ... time

(time) after (time) ... time

This phrase produces a time later by the amount given, keeping within the 24 hour clock. Example:

> 9 hours after 11 AM

produces 8 PM.

See 9.9. 9.9. Comparing and shifting times

Kind: phrase (time, time) -> time

Durations

(number) minutes ... time

(number) minutes ... time

This phrase converts numbers into lengths of time. Example:

> 15 minutes

Because it's a phrase, not just a notation for writing constants down, the number doesn't have to be given literally:

> let X be 5;
> if the player is in the Slow Room, now X is 10;
> let deadline be the time of day plus X minutes;

Note that lengths of time can't exceed 1440 minutes.

See 9.8. 9.8. Approximate times, lengths of time

Kind: phrase number -> time

(number) hours ... time

(number) hours ... time

This phrase converts numbers into lengths of time. Example:

> 10 hours

Note that lengths of time can't exceed 24 hours.

See 9.8. 9.8. Approximate times, lengths of time

Kind: phrase number -> time

Timed events

(rule) in (number) turn/turns from now

(rule) in (number) turn/turns from now

This phrase causes the given rule to be run at a given number of turns after the current one. Example:

> the egg-timer clucks in four turns from now;

See 9.11. 9.11. Future events

Kind: phrase (rule, number) -> nothing

(rule) at (time)

(rule) at (time)

This phrase causes the given rule to be run at a given time of day. Example:

> the egg-timer clucks at 11:35 AM;

See 9.11. 9.11. Future events

Kind: phrase (rule, time) -> nothing

(rule) in (time) from now

(rule) in (time) from now

This phrase causes the given rule to be run at a given time offset from the current time of day. Example:

> the egg-timer clucks in 18 minutes from now;

See 9.11. 9.11. Future events

Kind: phrase (rule, time) -> nothing

Scenes

if (scene) has happened:

| if (scene) has happened: This condition is true if the given scene has both begun and ended. See 10.4. 10.4. During scenes Kind: phrase scene -> truth state |

if (scene) has not happened:

| if (scene) has not happened: This condition is true if the given scene has not ended (or never started). See 10.4. 10.4. During scenes Kind: phrase scene -> truth state |

if (scene) has ended:

| if (scene) has ended: This condition is true if the given scene ended at least once. See 10.4. 10.4. During scenes Kind: phrase scene -> truth state |

if (scene) has not ended:

| if (scene) has not ended: This condition is true if the given scene has never ended. See 10.4. 10.4. During scenes Kind: phrase scene -> truth state |

Timing of scenes

time since (scene) began ... time

time since (scene) began ... time

This phrase produces the time since the named scene began, which only makes sense, of course, if it has indeed begun. Example:

> time since Entire Game began

See 10.3. 10.3. Using the Scene index

Kind: phrase scene -> time

time when (scene) began ... time

| time when (scene) began ... time This phrase produces the time (i.e., the value of the "time of day" variable) at the moment when the given scene began. See 10.3. 10.3. Using the Scene index Kind: phrase scene -> time |

time since (scene) ended ... time

time since (scene) ended ... time

This phrase produces the time since the named scene ended, which only makes sense, of course, if it has indeed ended. Example:

> time since Formal Dinner ended

See 10.3. 10.3. Using the Scene index

Kind: phrase scene -> time

time when (scene) ended ... time

| time when (scene) ended ... time This phrase produces the time (i.e., the value of the "time of day" variable) at the moment when the given scene ended. See 10.3. 10.3. Using the Scene index Kind: phrase scene -> time |

Player's identity and location

if in darkness:

if in darkness:

This condition is true if the player currently has no light to see by. Note that the test is more complicated than simply testing

> if the player is in a dark room, ...

since the player might have a torch, or be inside a cage which is itself in a dark room, and so on.

See 11.5. 11.5. Conditions and questions

Kind: phrase nothing -> truth state

Moving and removing things

move (object) to (object)

move (object) to (object)
optionally without printing a room description,
or printing an abbreviated room description

This phrase moves the first-named object to the second. Example:

> move the genie's lamp to Aladdin's Cave;

The first object named has to be a thing; the destination must be a room, as here, a container, a supporter, or a person. When something is moved, all its parts and contents (and all their contents, and so on) move with it. If the thing being moved is a person, then the destination is required to be a room or an enterable container. (In particular, a person cannot be carried by another person.)

Two options can be used if the object being moved is the player.

> move the player to Aladdin's Cave, without printing a room description

omits the description which would otherwise be produced. A compromise is to use:

> move the player to Aladdin's Cave, printing an abbreviated room description

which gives a full description if the player has never been here before, but only a brief one if it is a familiar scene. These options have no effect for any other objects being moved.

See 8.7. 8.7. Moving things

Kind: phrase (object, object) -> nothing

remove (object) from play

remove (object) from play

Removes the given object from play, so that it is not present in any room. We are not permitted to remove rooms, or doors, or the player, from play; but we are permitted to remove backdrops, making them disappear from all rooms in which they are present. Example:

> remove the gold coin from play;

See 8.10. 8.10. Removing things from play

Kind: phrase object -> nothing

Warning: This phrase is now deprecated! It will probably be withdrawn in future builds of Inform, and even the present build will reject it if the 'Use no deprecated features' option is set. If you're using it now, try following the documentation link above for advice on what to write instead.

move (object) backdrop to all (description of objects)

move (object) backdrop to all (description of objects)

This phrase moves the backdrop so that it is now present in every room matching the given description. Example: If we define

> A room can be wet or dry. A room is usually dry. The Rock Pool is wet.

then we can write

> move the stream backdrop to all wet rooms;

This phrasing, "move the ... backdrop to all ..." is deliberately meant to look unlike the simpler "move ... to ...", to emphasise that this kind of movement is possible only for backdrops.

See 8.8. 8.8. Moving backdrops

Kind: phrase (object, description of objects) -> nothing

update backdrop positions

update backdrop positions

This phrase runs through all backdrops in the model world and makes sure they are correctly in, or not in, the current location, so that everything appears right from the player's point of view. Example:

> The Upper Cave is above the Rock Pool. The Ledge is east of the Pool. The stream is a backdrop.

> When play begins:
> move the stream backdrop to all wet rooms.

> A lever is in the Cave. The lever is fixed in place.

> Instead of pulling the lever when the Cave is dry:
> now the Cave is wet;
> now the lever is in the Rock Pool;
> now the lever is portable;
> update backdrop positions;
> say "The old rusty lever pulls away, and the thin cave wall goes with it, so that a stream bursts into the cave, falling to the pool below."

See 8.8. 8.8. Moving backdrops

Kind: phrase nothing -> nothing

The map

location of (object) ... room

location of (object) ... room

This phrase produces the room which, perhaps indirectly, contains the object given. Example: if the player stands in Biblioll College and wears a waistcoat, inside which is a fob watch, then

> location of the fob watch

is Biblioll College. In general, a thing cannot be in two rooms at once, but there are two exceptions: two-sided doors, present on both sides, and backdrops. The "location of" a door is its front side, but a backdrop has no location. (Objects which are not things at all, such as rooms and directions, also have no location.)

See 3.25. 3.25. The location of something

Kind: phrase object -> room

room (direction) from/of (room) ... room

room (direction) from/of (room) ... room

This phrase produces the room which the given map direction leads to, or the special value "nothing" if it leads nowhere. If it leads to a door, the result is the room through that door. Examples:

> say "You look north into [the room north from the Garden]."
> if the room north from the Garden is nothing, say "The grass leads nowhere."

See 6.14. 6.14. Adjacent rooms and routes through the map

Kind: phrase (direction, room) -> room

door (direction) from/of (room) ... door

door (direction) from/of (room) ... door

This phrase produces the door which the given map direction leads to, or the special value "nothing" if it leads nowhere or to a room. Examples:

> let the barrier be the door north from the Garden;
> if the barrier is a door, say "Well, [the barrier] is in the way.";

See 6.14. 6.14. Adjacent rooms and routes through the map

Kind: phrase (direction, room) -> door

other side of (door) from (room) ... object

other side of (door) from (room) ... object

This phrase produces the room on the other side of the door, as seen from the given vantage point, which needs to be one of its sides. Example: if

> The red rock stair is east of the Orchard and above the Undertomb.

then "other side of the red rock stair from the Undertomb" produces the Orchard, and vice versa.

See 3.12. 3.12. Doors

Kind: phrase (door, room) -> object

direction of (door) from (room) ... object

direction of (door) from (room) ... object

This phrase produces the direction in which the door leads, as seen from the given vantage point, which needs to be one of its sides. Example: if

> The red rock stair is east of the Orchard and above the Undertomb.

then "direction of the red rock stair from the Undertomb" produces up.

See 3.12. 3.12. Doors

Kind: phrase (door, room) -> object

room-or-door (direction) from/of (room) ... object

room-or-door (direction) from/of (room) ... object

This phrase produces the object which the given map direction leads to, which will always be either a room, a door or the special value "nothing". The phrase is used mainly by the Standard Rules, for technical reasons, and usually it's better to use "room ... from ..." or "door ... from ..." instead.

See 6.14. 6.14. Adjacent rooms and routes through the map

Kind: phrase (direction, room) -> object

change (direction) exit of (room) to (room)

change (direction) exit of (room) to (room)

This phrase alters the map so that the given map connection is made. Note that connections can be made to rooms, but not doors: the positions of doors are fixed. Example:

> change the east exit of the Closet to the Tsar's Imperial Dining Salon

Since "nothing" is not a room, this doesn't allow us to change the exit to nothing, so there is a separate definition of:

> change the west exit of the Closet to nothing

See 8.5. 8.5. Change of properties with values

Kind: phrase (direction, room, room) -> nothing

change (direction) exit of (room) to nothing/nowhere

change (direction) exit of (room) to nothing/nowhere

This phrase alters the map so that the given map connection is unmade. Example:

> change the west exit of the Closet to nowhere

See 8.5. 8.5. Change of properties with values

Kind: phrase (direction, room) -> nothing

front side of (object) ... room

front side of (object) ... room

This phrase produces the first of the one or two rooms containing a door - first in the order given in the source text. Example: if

> The red rock stair is east of the Orchard and above the Undertomb.

then "front side of the red rock stair" produces the Orchard. For a one-sided door, this produces the only room containing the door.

See 3.12. 3.12. Doors

Kind: phrase object -> room

back side of (object) ... room

back side of (object) ... room

This phrase produces the last of the one or two rooms containing a door - last in the order given in the source text. Example: if

> The red rock stair is east of the Orchard and above the Undertomb.

then "back side of the red rock stair" produces the Undertomb. A one-sided door has no "back side."

See 3.12. 3.12. Doors

Kind: phrase object -> room

Route-finding

best route from (object) to (object) ... object

best route from (object) to (object) ... object
optionally using doors,
or using even locked doors

This phrase produces a direction to take in order to get from A to B by the shortest number of movements between rooms, or produces "nothing" if there is no way through at all. Example:

> The description of the brass compass is "The dial points quiveringly to [best route from the location to the Lodestone Room]."

Best routes are ordinarily forbidden to go through doors, but if the suffix "using doors" is added as an option then any open or openable and unlocked door may be used on the way; and if "using even locked doors" is given, then any door at all will do. Since magnetism is no respecter of property, that seems right here:

> The description of the brass compass is "The dial points quiveringly to [best route from the location to the Lodestone Room, using even locked doors]."

See 6.14. 6.14. Adjacent rooms and routes through the map

Kind: phrase (object, object) -> object

number of moves from (object) to (object) ... number

number of moves from (object) to (object) ... number
optionally using doors,
or using even locked doors

This phrase produces the number of map connections which must be followed in order to get from A to B by the shortest number of movements between rooms. If A and B are the same, the answer is 0; if there is no route at all, the answer is -1. Example:

> The description of the proximity gadget is "You are now [number of moves from the location to the Sundial] moves from the Sundial.";

See 6.14. 6.14. Adjacent rooms and routes through the map

Kind: phrase (object, object) -> number

best route from (object) to (object) through (description of objects) ... object

best route from (object) to (object) through (description of objects) ... object
optionally using doors,
or using even locked doors

This phrase produces a direction to take in order to get from A to B by the shortest number of movements between rooms which match the given description, or produces "nothing" if there is no way through at all. Example:

> best route from the Drawbridge to the Keep through visited rooms

The condition - in this case, that "visited rooms" must be used - also applies to both ends of the journey, so if either Drawbridge or Keep are unvisited then this is "nothing". (Similarly, saying something like "...through containers" would mean there is never a route.)

See 6.14. 6.14. Adjacent rooms and routes through the map

Kind: phrase (object, object, description of objects) -> object

number of moves from (object) to (object) through (description of objects) ... number

number of moves from (object) to (object) through (description of objects) ... number
optionally using doors,
or using even locked doors

This phrase produces the number of map connections which must be followed in order to get from A to B by the shortest number of movements between rooms matching the given description. If A and B are the same, the answer is 0; if there is no route at all, or if either A or B fail to match the description themselves, the answer is -1.

See 6.14. 6.14. Adjacent rooms and routes through the map

Kind: phrase (object, object, description of objects) -> number

The object tree

holder of (object) ... object

| holder of (object) ... object This phrase produces the container, supporter, carrier, wearer or room in which the object resides. See 8.17. 8.17. Looking at containment by hand Kind: phrase object -> object |

next thing held after (object) ... object

next thing held after (object) ... object

This phrase produces the next item of the list of things held by something. Example: suppose Baroness Orczy is carrying a lapdog and a string of pearls.

> next thing held after the lapdog

is then the string of pearls.

See 8.17. 8.17. Looking at containment by hand

Kind: phrase object -> object

first thing held by (object) ... object

first thing held by (object) ... object

This phrase produces the first of the list of things held by the object. Example:

> first thing held by Baroness Orczy

See 8.17. 8.17. Looking at containment by hand

Kind: phrase object -> object

Understanding

Asking yes/no questions

if player consents:

if player consents:

This condition is unusual in doing something and not simply making a silent check: it waits for the player to type YES (or Y) or NO (or N) at the keyboard, and then is true if the answer was yes. Example:

> say "Are you quite sure you want to kiss the Queen? ";
> if the player consents:
> ...

See 11.5. 11.5. Conditions and questions

Kind: phrase nothing -> truth state

The player's command

if (snippet) matches (topic):

if (snippet) matches (topic):

This condition is true if the given snippet exactly matches the specification. Example:

> if the player's command matches "room [number]", ...

will be true if the command is ROOM 101, but not if it's EXPLORE ROOM 7.

See 18.33. 18.33. Reading a command

Kind: phrase (snippet, topic) -> truth state

if (snippet) does not match (topic):

| if (snippet) does not match (topic): This condition is true if the given snippet does not exactly match the specification. See 18.33. 18.33. Reading a command Kind: phrase (snippet, topic) -> truth state |

if (snippet) includes (topic):

if (snippet) includes (topic):

This condition is true if the given snippet includes words matching the specification, either at the beginning, in the middle, or at the end. Example:

> if the player's command includes "room [number]", ...

will be true if the command is ROOM 101, EXPLORE ROOM 7, or ROOM 22 AHOY, but not if it's VISIT ROOM GAMMA 7.

See 18.33. 18.33. Reading a command

Kind: phrase (snippet, topic) -> truth state

if (snippet) does not include (topic):

| if (snippet) does not include (topic): This condition is true if the given snippet does not include any run of words which matches the specification. See 18.33. 18.33. Reading a command Kind: phrase (snippet, topic) -> truth state |

Changing the player's command

change the text of the player's command to (text)

change the text of the player's command to (text)

This phrase should be used only in "after" rules for the "reading a command" activity; it replaces the current command text entirely. Example:

> After reading a command:
> let T be "[the player's command]";
> replace the regular expression "\p" in T with "";
> change the text of the player's command to T.

This converts the player's command to text, which is then manipulated by searching for any punctuation mark and replacing it with blank text (that is, deleted), and then put back again as the new command.

See 18.33. 18.33. Reading a command

Kind: phrase text -> nothing

replace (snippet) with (text)

replace (snippet) with (text)

This phrase should be used only in "after" rules for the "reading a command" activity; it replaces the snippet of command, usually the "matched text" found immediately before, with the given text. Example:

> if the player's command includes "room [number]":
> replace the matched text with "office".

See 18.33. 18.33. Reading a command

Kind: phrase (snippet, text) -> nothing

cut (snippet)

cut (snippet)

This phrase should be used only in "after" rules for the "reading a command" activity; it removes the snippet of command. Example:

> if the player's command includes "or else":
> cut the matched text.

See 18.33. 18.33. Reading a command

Kind: phrase snippet -> nothing

reject the player's command

| reject the player's command This phrase should be used only in rules for the "reading a command" activity. It tells Inform not to bother analysing the text further, but to go back to the keyboard. (No time passes; no turn elapses; nothing happens in the simulated world.) See 18.33. 18.33. Reading a command Kind: phrase nothing -> nothing |

Scope and pronouns

place (object) in scope

place (object) in scope
optionally but not its contents

This phrase should only be used in rules for the "deciding the scope of..." activity. It places the given object in scope, making it accessible to the player's commands, regardless of where it is in the model world. Examples:

> place the distant volcano in scope;
> place the lacquered box in scope, but not its contents;

Ordinarily if something is placed in scope, then so are its parts and (in the case of a supporter or a transparent or open container) its contents; using the "but not its contents" option we can place just the box itself in scope.

See 18.29. 18.29. Deciding the scope of something

Kind: phrase object -> nothing

place the/-- contents of (object) in scope

place the/-- contents of (object) in scope

This phrase should only be used in rules for the "deciding the scope of..." activity. It places the things inside or on top of the given object in scope, making them accessible to the player's commands, but it does nothing to place the object itself in scope. (It might of course be in scope anyway, and if it is then this phrase won't remove it.) Example:

> place the contents of the lacquered box in scope;
> place the contents of the Marbled Steps in scope;

Note that the object in question can be a room, as in this second example.

See 18.29. 18.29. Deciding the scope of something

Kind: phrase object -> nothing

set pronouns from (object)

set pronouns from (object)

This phrase adjusts the meaning of pronouns like IT, HIM, HER and THEM in the command parser as if the object mentioned has become the subject of conversation. Example: the combination of

> set pronouns from the key;
> set pronouns from Bunny;

might change IT to mean the silver key and HIM to mean Harry "Bunny" Manders, while leaving HER and THEM unaltered.

See 17.18. 17.18. Changing the meaning of pronouns

Kind: phrase object -> nothing

From the extension English Language by Graham Nelson

Section 1 - Grammatical definitions

say "[regarding object]"

| say "[regarding object]" |

say "[regarding number]"

| say "[regarding number]" |

say "[regarding list writer internals]"

| say "[regarding list writer internals]" |

say "[regarding description of objects]"

| say "[regarding description of objects]" |

if prior naming context is plural:

| if prior naming context is plural: Kind: phrase nothing -> truth state |

Section 2 - Saying pronouns

say "[we]"

| say "[we]" |

say "[us]"

| say "[us]" |

say "[ours]"

| say "[ours]" |

say "[ourselves]"

| say "[ourselves]" |

say "[our]"

| say "[our]" |

say "[We]"

| say "[We]" |

say "[Us]"

| say "[Us]" |

say "[Ours]"

| say "[Ours]" |

say "[Ourselves]"

| say "[Ourselves]" |

say "[Our]"

| say "[Our]" |

Section 3 - Further pronouns

say "[those]"

| say "[those]" |

say "[Those]"

| say "[Those]" |

say "[those in grammatical case]"

| say "[those in grammatical case]" |

say "[Those in grammatical case]"

| say "[Those in grammatical case]" |

say "[they]"

| say "[they]" |

say "[They]"

| say "[They]" |

say "[their]"

| say "[their]" |

say "[Their]"

| say "[Their]" |

say "[them]"

| say "[them]" |

say "[Them]"

| say "[Them]" |

say "[theirs]"

| say "[theirs]" |

say "[Theirs]"

| say "[Theirs]" |

say "[themselves]"

| say "[themselves]" |

say "[Themselves]"

| say "[Themselves]" |

say "[they're]"

| say "[they're]" |

say "[They're]"

| say "[They're]" |

say "[It]"

| say "[It]" |

say "[There]"

| say "[There]" |

say "[it]"

| say "[it]" |

say "[there]"

| say "[there]" |

say "[It's]"

| say "[It's]" |

say "[There's]"

| say "[There's]" |

say "[it's]"

| say "[it's]" |

say "[there's]"

| say "[there's]" |

say "[possessive]"

| say "[possessive]" |

say "[Possessive]"

| say "[Possessive]" |

Lx 2 | Lexicon — Words used in descriptions About descriptions

For instance, the description 'an unlocked door' is made up from the adjective 'unlocked' and the noun 'door', both of which can be found below. Property adjectives, like 'open', can be used when creating things - 'In the Ballroom is an open container' is allowed because 'open' is a property - but those with complicated definitions, like 'empty', can only be tested during play, e.g. with rules like 'Instead of taking an empty container, ...'.

a

a part of, to be

above, to be

accusative ... noun, value of grammatical case

achieve

active ... adjective: (of use option) it has been requested in the source text

adjacent ... adjective: (of room) A room is adjacent if it is adjacent to the location

adjacent to, to be

all used in conditions: 'if all of the doors are open'

all but used to count things: 'all but three containers'

all except - see all but

almost all used in conditions: true if 80 percent or more possibilities work

almost no used in conditions: true if fewer than 20 percent of possibilities work

ambiguously plural ... adjective: (of object) either/or property of object

an

animal ... noun, a kind of person

appreciate

aren't holding that error ... noun, value of command parser error

arrive

at least used to count things: 'at least five doors'

at least, to be

at most - see at least

at most, to be

backdrop ... noun, a kind of thing

be

be able to

be able to see

be able to touch

being able to see, to be

being able to touch, to be

below, to be

can only do that to something animate error ... noun, value of command parser error

can only use multiple objects error ... noun, value of command parser error

can't again the addressee error ... noun, value of command parser error

can't see any such thing error ... noun, value of command parser error

can't see it at the moment error ... noun, value of command parser error

can't see whom to talk to error ... noun, value of command parser error

can't talk to inanimate things error ... noun, value of command parser error

can't use multiple objects error ... noun, value of command parser error

care

carried ... adjective: (of thing) a thing is carried if the player is carrying it

carried by, to be

carry

carrying, to be

close

closed ... adjective: (of object) either/or property of door, opposite of open

comma can't begin error ... noun, value of command parser error

conceal

concealed ... adjective: (of thing) Something is concealed rather than unconcealed if the holder of it conceals it

concealed by, to be

concealing, to be

contain

contained by, to be

contained in, to be

container ... noun, a kind of thing

containing, to be

could

dark ... adjective: (of object) either/or property of room, opposite of lighted

described ... adjective: (of object) either/or property of thing, opposite of undescribed

device ... noun, a kind of thing

didn't understand addressee's last name error ... noun, value of command parser error

didn't understand error ... noun, value of command parser error

didn't understand that number error ... noun, value of command parser error

didn't understand the way that finished error ... noun, value of command parser error

die

direction ... noun, a kind of object

discover

do

door ... noun, a kind of thing

drop

each - see all

eat

edible ... adjective: (of object) either/or property of thing, opposite of inedible

empty ... adjective:
1. (of text) it contains no characters;
2. (of table name) a table name is empty rather than non-empty if the number of filled rows in it is 0;
3. (of rulebook) it contains no rules, so that following it does nothing and makes no decision;
4. (of activity) its before, for and after rulebooks are all empty;
5. (of list of k) it contains no entries;
6. (of relation) it does not relate any values, that is, R (x, y) is false for all x and y

enclose

enclosed by, to be

enclosing, to be

English language ... noun, value of natural language

enterable ... adjective: (of object) either/or property of container or supporter

Entire Game ... noun, value of scene

equivalence ... adjective: (of relation) it is an equivalence relation, that is, it relates in groups

even ... adjective: (of number) a number is even rather than odd if the remainder after dividing it by 2 is 0

every - see all, and can also be used in generalisations such as 'A nose is part of every person.'

exactly whereas 'if two doors are open' implicitly means 'if at least two doors are open', 'if exactly two...' makes the count precise

excepted something not included error ... noun, value of command parser error

existent ... adjective: (of real number) opposite of nonexistent

feel

female ... adjective: (of object) either/or property of person, opposite of male

feminine gender ... noun, value of grammatical gender

fewer than pedantic way to say less than when counting

Figure of cover ... noun, value of figure name

find

finite ... adjective: (of real number) opposite of infinite

first person plural ... noun, value of narrative viewpoint

first person singular ... noun, value of narrative viewpoint

fixed in place ... adjective: (of object) either/or property of thing, opposite of portable

French language ... noun, value of natural language

full ... adjective: (of table name) a table name is full rather than non-full if the number of blank rows in it is 0

future tense ... noun, value of grammatical tense

German language ... noun, value of natural language

get

give

go

going on ... adjective: (of activity) one of its three rulebooks is currently being run

greater than used to count things: 'greater than three rooms'

greater than, to be

had by, to be

handled ... adjective: (of object) either/or property of thing

happen

happening ... adjective: (of scene) it is currently taking place

have

having, to be

hear

held ... adjective: (of thing) a thing is held if the player is holding it

held by, to be

held in, to be

held inside, to be

hold

holding, to be

I beg your pardon error ... noun, value of command parser error

improper-named ... adjective: (of object) either/or property of object, opposite of proper-named

in, to be

inactive ... adjective: (of use option) opposite of active

incorporate

incorporated by, to be

incorporating, to be

inedible ... adjective: (of object) either/or property of thing, opposite of edible

infinite ... adjective: (of real number) a real number is infinite rather than finite if it is plus infinity or it is minus infinity

inside, to be

invisible ... adjective: (of thing) opposite of visible

Italian language ... noun, value of natural language

jump

lack

lead

less than - see more than

less than, to be

lighted ... adjective: (of object) either/or property of room, opposite of dark

like

listen

lit ... adjective: (of object) either/or property of thing, opposite of unlit

locale-supportable ... adjective: (of thing) a thing (called the item) is locale-supportable if the item is not scenery and the item is not mentioned and the item is not undescribed

lock

lockable ... adjective: (of object) either/or property of door or container

locked ... adjective: (of object) either/or property of door or container, opposite of unlocked

look

male ... adjective: (of object) either/or property of person, opposite of female

man ... noun, a kind of person

mapped above, to be

mapped below, to be

mapped down of, to be

mapped east of, to be

mapped inside, to be

mapped north of, to be

mapped northeast of, to be

mapped northwest of, to be

mapped outside, to be

mapped south of, to be

mapped southeast of, to be

mapped southwest of, to be

mapped up of, to be

mapped west of, to be

marked for listing ... adjective: (of object) either/or property of thing or direction, opposite of unmarked for listing

masculine gender ... noun, value of grammatical gender

may

mean

meaning, to be

meaningful ... adjective: (of verb) it has a meaning in Inform as a relation, rather than existing only to be printed out

meaningless ... adjective: (of verb) opposite of meaningful

meant by, to be

mentioned ... adjective: (of object) either/or property of thing, opposite of unmentioned

might

modal ... adjective: (of verb) it modifies the likelihood of another verb happening, rather than being meaningful itself

more than used to count things: 'more than three rooms'

most used in conditions: true if a simple majority of possibilities work

must

need

negative ... adjective:
1. (of number) a number is negative if it is less than zero;
2. (of real number) a real number is negative if it is less than zero

neuter ... adjective: (of object) either/or property of person

neuter gender ... noun, value of grammatical gender

no opposite of 'all': 'if no door is open...'

nominative ... noun, value of grammatical case

non-empty ... adjective:
1. (of text) opposite of empty;
2. (of table name) opposite of empty;
3. (of rulebook) opposite of empty;
4. (of activity) opposite of empty;
5. (of list of k) opposite of empty;
6. (of relation) opposite of empty

non-full ... adjective: (of table name) opposite of full

non-modal ... adjective: (of verb) opposite of modal

non-recurring ... adjective: (of scene) either/or property of scene, opposite of recurring

none opposite of 'all of': 'if none of the doors is open...'

nonexistent ... adjective: (of real number) it results from an impossible calculation, like the square root of minus one

not a verb I recognise error ... noun, value of command parser error

not enough of those available error ... noun, value of command parser error

not something you need to refer to error ... noun, value of command parser error

not sure what it refers to error ... noun, value of command parser error

nothing to do error ... noun, value of command parser error

noun did not make sense in that context error ... noun, value of command parser error

odd ... adjective: (of number) opposite of even

off-stage ... adjective: (of thing) opposite of on-stage

offstage ... adjective: (of thing) Something is offstage if it is off-stage

on, to be

on top of, to be

on-stage ... adjective: (of thing) it is indirectly in one of the rooms

one-to-one ... adjective: (of relation) it is a one-to-one relation, that is, any given X can relate to only one Y, and vice versa

one-to-various ... adjective: (of relation) it is a one-to-various relation, that is, any given Y has only one X such that X relates to Y

only understood as far as error ... noun, value of command parser error

opaque ... adjective: (of object) either/or property of container, opposite of transparent

open ... adjective: (of object) either/or property of door or container, opposite of closed

open

openable ... adjective: (of object) either/or property of door or container, opposite of unopenable

part of, to be

parts of, to be

pass

past perfect tense ... noun, value of grammatical tense

past tense ... noun, value of grammatical tense

perfect tense ... noun, value of grammatical tense

person ... noun, a kind of thing

pick

player's holdall ... noun, a kind of container

plural-named ... adjective: (of object) either/or property of object, opposite of singular-named

portable ... adjective: (of object) either/or property of thing, opposite of fixed in place

positive ... adjective:
1. (of number) a number is positive if it is greater than zero;
2. (of real number) a real number is positive if it is greater than zero

present tense ... noun, value of grammatical tense

privately-named ... adjective: (of object) either/or property of room, region, thing or direction, opposite of publicly-named

proper-named ... adjective: (of object) either/or property of object, opposite of improper-named

provide

provided by, to be

providing, to be

provoke

publicly-named ... adjective: (of object) either/or property of room, opposite of privately-named

pull

push

pushable between rooms ... adjective: (of object) either/or property of thing

put

recurring ... adjective: (of scene) either/or property of scene, opposite of non-recurring

referred to a determination of scope error ... noun, value of command parser error

region ... noun, a kind of object

regionally in, to be

relate

related by, to be

relating, to be

room ... noun, a kind of object

rub

said too little error ... noun, value of command parser error

say

scenery ... adjective: (of object) either/or property of thing

search

second person plural ... noun, value of narrative viewpoint

second person singular ... noun, value of narrative viewpoint

see

seem

set

should

singular-named ... adjective: (of object) either/or property of object, opposite of plural-named

smell

sniff

some

Spanish language ... noun, value of natural language

squeeze

substituted ... adjective: (of text) any square-bracketed text substitutions in it have been made

support

supported by, to be

supported on, to be

supporter ... noun, a kind of thing

supporting, to be

Swedish language ... noun, value of natural language

switch

switched off ... adjective: (of object) either/or property of device, opposite of switched on

switched on ... adjective: (of object) either/or property of device, opposite of switched off

symmetric ... adjective: (of relation) it is a symmetric relation, that is, it's always true that X is related to Y if and only if Y is related to X

take

talk

taste

that used to place a further condition on a description: like 'which' in 'A which is B', or 'A which carries B', for instance.

the

the same property as, to be

thing ... noun, a kind of object

third person plural ... noun, value of narrative viewpoint

third person singular ... noun, value of narrative viewpoint

through, to be

touch

touchable ... adjective: (of thing) Something is touchable rather than untouchable if the player can touch it

transparent ... adjective: (of object) either/or property of container, opposite of opaque

turn

unconcealed ... adjective: (of thing) opposite of concealed

under half used in conditions: true if fewer than half of possibilities work

undescribed ... adjective: (of object) either/or property of thing, opposite of described

unlit ... adjective: (of object) either/or property of thing, opposite of lit

unlock

unlocked ... adjective: (of object) either/or property of door, opposite of locked

unlocked by, to be

unlocking, to be

unmarked for listing ... adjective: (of object) either/or property of thing, opposite of marked for listing

unmentioned ... adjective: (of object) either/or property of thing, opposite of mentioned

unopenable ... adjective: (of object) either/or property of door, opposite of openable

unsubstituted ... adjective: (of text) opposite of substituted

untouchable ... adjective: (of thing) opposite of touchable

unvisited ... adjective: (of object) either/or property of room, opposite of visited

various-to-one ... adjective: (of relation) it is a various-to-one relation, that is, any given X relates to only one Y

various-to-various ... adjective: (of relation) it is a various-to-various relation, that is, there are no limitations on how many X can relate to a given Y, or vice versa

vehicle ... noun, a kind of container

visible ... adjective: (of thing) Something is visible rather than invisible if the player can see it

visited ... adjective: (of object) either/or property of room, opposite of unvisited

wait

wave

wear

wearable ... adjective: (of object) either/or property of thing

wearing, to be

which used to place a further condition on a description: like 'which' in 'A which is B', or 'A which carries B', for instance.

who used to place a further condition on a description: like 'which' in 'A which is B', or 'A which carries B', for instance.

win

within, to be

woman ... noun, a kind of person

worn ... adjective: (of thing) a thing is worn if the player is wearing it

worn by, to be

would

Rl 3 | Relations — Relations give meaning to verbs About relations

name | category | relates this... | ...to this
equality | equality | value | value
provision | provision | value | property
numerically-greater-than | numeric | arithmetic value | arithmetic value
numerically-less-than | numeric | arithmetic value | arithmetic value
numerically-greater-than-or-equal-to | numeric | arithmetic value | arithmetic value
numerically-less-than-or-equal-to | numeric | arithmetic value | arithmetic value
containment | spatial | container/room | thing
support | spatial | supporter | thing
incorporation | spatial | thing | thing
carrying | spatial | person | thing
holding | spatial | person | thing
wearing | spatial | person | thing
possession | spatial | person | thing
room-containment | spatial | room | thing
visibility | spatial | thing | thing
touchability | spatial | thing | thing
concealment | spatial | thing | thing
enclosure | spatial | object | object
adjacency | spatial | room | room
regional-containment | spatial | region | room/region
mapping north | map | room/door | room/door
mapping northeast | map | room/door | room/door
mapping northwest | map | room/door | room/door
mapping south | map | room/door | room/door
mapping southeast | map | room/door | room/door
mapping southwest | map | room/door | room/door
mapping east | map | room/door | room/door
mapping west | map | room/door | room/door
mapping up | map | room/door | room/door
mapping down | map | room/door | room/door
mapping inside | map | room/door | room/door
mapping outside | map | room/door | room/door
leading-through | one-to-various | room | door
lock-fitting | one-to-various | thing | thing

Vb 4 | Verbs — A table of verbs About verbs

Verbs listed as "for saying only" are values of the kind "verb" and can be used in adaptive text, but they have no meaning to Inform, so they can't be used in sentences about what's in the story.

To be a part of ... reversed incorporation

To be above ... reversed mapping up

To achieve ... for saying only

To be adjacent to ... reversed adjacency

To appreciate ... for saying only

To arrive ... for saying only

To be at least ... numerically-greater-than-or-equal-to

To be at most ... numerically-less-than-or-equal-to

To be ... equality

present: A is B; A are B

past: A was B; A were B

present perfect: A has been B

past perfect: A have been B; A had been B; A had been B

To be able to ... for saying only

To be able to see ... visibility

present: A can see B; A can see B; B can be seen by A; B can be seen by A

past: A could see B; A could see B; B could be seen by A; B could be seen by A

present perfect: A has been able to see B; B has been able to be seen by A

past perfect: A have been able to see B; A had been able to see B; A had been able to see B; B have been able to be seen by A; B had been able to be seen by A; B had been able to be seen by A

To be able to touch ... touchability

present: A can touch B; A can touch B; B can be touched by A; B can be touched by A

past: A could touch B; A could touch B; B could be touched by A; B could be touched by A

present perfect: A has been able to touch B; B has been able to be touched by A

past perfect: A have been able to touch B; A had been able to touch B; A had been able to touch B; B have been able to be touched by A; B had been able to be touched by A; B had been able to be touched by A

To be being able to see ... visibility

To be being able to touch ... touchability

To be below ... reversed mapping down

To care ... for saying only

To be carried by ... reversed carrying

To carry ... carrying

present: A carries B; A carry B

past: A carried B; A carried B

present perfect: A has carried B

past perfect: A have carried B; A had carried B; A had carried B

To be carrying ... carrying

To close ... for saying only

To conceal ... concealment

present: A conceals B; A conceal B

past: A concealed B; A concealed B

present perfect: A has concealed B

past perfect: A have concealed B; A had concealed B; A had concealed B

To be concealed by ... reversed concealment

To be concealing ... concealment

To contain ... containment

present: A contains B; A contain B

past: A contained B; A contained B

present perfect: A has contained B

past perfect: A have contained B; A had contained B; A had contained B

To be contained by ... reversed containment

To be contained in ... reversed containment

To be containing ... containment

To could ... for saying only

To die ... for saying only

To discover ... for saying only

To do ... for saying only

To drop ... for saying only

To eat ... for saying only

To enclose ... enclosure

present: A encloses B; A enclose B

past: A enclosed B; A enclosed B

present perfect: A has enclosed B

past perfect: A have enclosed B; A had enclosed B; A had enclosed B

To be enclosed by ... reversed enclosure

To be enclosing ... enclosure

To feel ... for saying only

To find ... for saying only

To get ... for saying only

To give ... for saying only

To go ... for saying only

To be greater than ... numerically-greater-than

To be had by ... reversed possession

To happen ... for saying only

To have ... possession

present: A has B; A have B

past: A had B; A had B

present perfect: A has had B

past perfect: A have had B; A had had B; A had had B

To be having ... possession

To hear ... for saying only

To be held by ... reversed holding

To be held in ... reversed containment

To be held inside ... reversed containment

To hold ... holding

present: A holds B; A hold B

past: A held B; A held B

present perfect: A has held B

past perfect: A have held B; A had held B; A had held B

To be holding ... holding

To be in ... reversed containment

To incorporate ... incorporation

present: A incorporates B; A incorporate B

past: A incorporated B; A incorporated B

present perfect: A has incorporated B

past perfect: A have incorporated B; A had incorporated B; A had incorporated B

To be incorporated by ... reversed incorporation

To be incorporating ... incorporation

To be inside ... reversed containment

To jump ... for saying only

To lack ... for saying only

To lead ... for saying only

To be less than ... numerically-less-than

To like ... for saying only

To listen ... for saying only

To lock ... for saying only

To look ... for saying only

To be mapped above ... reversed mapping up

To be mapped below ... reversed mapping down

To be mapped down of ... mapping down

To be mapped east of ... mapping east

To be mapped inside ... mapping inside

To be mapped north of ... mapping north

To be mapped northeast of ... mapping northeast

To be mapped northwest of ... mapping northwest

To be mapped outside ... mapping outside

To be mapped south of ... mapping south

To be mapped southeast of ... mapping southeast

To be mapped southwest of ... mapping southwest

To be mapped up of ... mapping up

To be mapped west of ... mapping west

To may ... for saying only

To mean ... meaning

present: A means B; A mean B

past: A meant B; A meant B

present perfect: A has meant B

past perfect: A have meant B; A had meant B; A had meant B

To be meaning ... meaning

To be meant by ... reversed meaning

To might ... for saying only

To must ... for saying only

To need ... for saying only

To be on ... reversed support

To be on top of ... reversed support

To open ... for saying only

To be part of ... reversed incorporation

To be parts of ... reversed incorporation

To pass ... for saying only

To pick ... for saying only

To provide ... provision

present: A provides B; A provide B

past: A provided B; A provided B

present perfect: A has provided B

past perfect: A have provided B; A had provided B; A had provided B

To be provided by ... reversed provision

To be providing ... provision

To provoke ... for saying only

To pull ... for saying only

To push ... for saying only

To put ... for saying only

To be regionally in ... reversed regional-containment

To relate ... universal

present: A relates B; A relate B

past: A related B; A related B

present perfect: A has related B

past perfect: A have related B; A had related B; A had related B

To be related by ... reversed universal

To be relating ... universal

To rub ... for saying only

To say ... for saying only

To search ... for saying only

To see ... for saying only

To seem ... for saying only

To set ... for saying only

To should ... for saying only

To smell ... for saying only

To sniff ... for saying only

To squeeze ... for saying only

To support ... support

present: A supports B; A support B

past: A supported B; A supported B

present perfect: A has supported B

past perfect: A have supported B; A had supported B; A had supported B

To be supported by ... reversed support

To be supported on ... reversed support

To be supporting ... support

To switch ... for saying only

To take ... for saying only

To talk ... for saying only

To taste ... for saying only

To be the same property as ... same-specification-as

To be through ... leading-through

To touch ... for saying only

To turn ... for saying only

To unlock ... lock-fitting

present: A unlocks B; A unlock B

past: A unlocked B; A unlocked B

present perfect: A has unlocked B

past perfect: A have unlocked B; A had unlocked B; A had unlocked B

To be unlocked by ... reversed lock-fitting

To be unlocking ... lock-fitting

To wait ... for saying only

To wave ... for saying only

To wear ... wearing

present: A wears B; A wear B

past: A wore B; A wore B

present perfect: A has worn B

past perfect: A have worn B; A had worn B; A had worn B

To be wearing ... wearing

To win ... for saying only

To be within ... reversed containment

To be worn by ... reversed wearing

To would ... for saying only