| Roger Firth's IF pages | ![]() |
| Informary -- Inform 6 commands | ![]() |
![]() |
There are two main ways of locating information. All of the entries are given in alphabetical order, so you can jump directly to a specific block of data. Alternatively, you can follow one of the fifteen threads which link entries of the same type into chains. Most entries have links to the appropriate section in the Designer's Manual.

Roger Firth
updated 22Nov99
1.2
Introduces a comment - compiler ignores the remainder of the line.
! This text is ignored by the compiler
statement
1.14
Outputs text to the terminal, followed by a newline, then returns true from the current routine. (Equivalent to print_ret "string".) See also print print_ret.
"string";
1.4
Surround the declaration of a text string constant.
4.2
Introduces a directive within a routine.
[ identifier; ... #directive; ... ];
9.0
Introduces an action when referenced as a constant.
if (action == ##Look) ...;
2.5
Obsolete reference to a dictionary word - now use 'word' (unless the word is a single character).
Obsolete reference to a routine - now simply use the routines identifier without any parentheses.
1.4
Introduces a hexadecimal number.
1.4
Introduces a binary number.
operator
1.5
Performs sixteen-bit signed division, and returns the remainder in an expression.
7 % 3 ! Evaluates to 1
operator
1.5
Performs sixteen-bit bitwise AND in an expression.
$1234 & $00FF ! Evaluates to $0034
comparative operator
1.8
Logical AND: joins two elements into a boolean_expression which is true only if both elements are true.
boolean_expression && boolean_expression
if (self.number >= 3 && self.number <= 5) ...;
1.4
2.5
3.5
Surround a text word which is added to the Inform dictionary.
operator
1.5
Used to establish precedence in an expression, in do for if objectloop switch while statements, and to surround the arguments when calling a routine.
1.14
Surround a print rule: one of (a) (address) (char) (name) (number) (property) (string) (The) (the), or a (routine). See also print print_ret.
operator
1.5
Performs sixteen-bit signed multiplication in an expression.
7 * 3 ! Evaluates to 21
5.0
Invokes localised trace-printing when given as the first local variable of a routine.
[ identifier * variable1 variable2 ...;
statement;
statement;
...
return some_value;
];
operator
1.5
Performs sixteen-bit signed addition in an expression.
7 + 3 ! Evaluates to 10
operator
1.5
Increments by 1 in an expression. ++variable returns the value before increment. variable++ returns the value after increment.
if (++my_counter == 8) ...; if (my_counter++ == 9) ...;
operator
General-purpose list separator: see Object private routine switch with.
operator
1.5
Introduces a negative number, and performs sixteen-bit signed subtraction in an expression.
7 - 3 ! Evaluates to 4
operator
1.5
Decrements by 1 in an expression. --variable returns the value before decrement. variable-- returns the value after decrement.
if (--my_counter == 1) ...; if (my_counter-- == 0) ...;
operator
Addresses an entry in a sixteen-bit word array. See Array.
operator
Addresses an entry in a byte array. See Array.
operator
3.5
Used when specifying an objects property name:
object.property
More generally, used when constructing a message.
1.13
Introduces a label.
operator
3.5
Introduces an objects property length. See Array.
operator
3.5
Introduces an objects property address. See Array.
operator
1.5
Performs sixteen-bit signed division in an expression.
7 / 3 ! Evaluates to 2
See for.
operator
3.10
Used when evaluating a property inherited from a class.
object.class::property
1.2
Separates Inform instructions.
comparative operator
1.8
Less than: evaluates to true if argument1 is numerically less than argument2.
argument1 < argument2
if (self.number < 3) ...;
statement
9.0
Surround an action, generally in another action routine, which is to be triggered at this time.
<action>; <action noun>; <action noun second>;
statement
9.0
Equivalent to <...>; rtrue;.
<<action>>; <<action noun>>; <<action noun second>>;
comparative operator
1.8
Not greater than: evaluates to true unless argument1 is numerically greater than argument2.
argument1 <= argument2
if (self.number <= 2) ...;
operator
1.4
See assignment.
comparative operator
1.8
Equal to: evaluates to true if argument1 is numerically equal to argument2.
argument1 == argument2
if (self.number == 4) ...;
comparative operator
1.8
Greater than: evaluates to true if argument1 is numerically greater than argument2.
argument1 > argument2
if (self.number > 5) ...;
comparative operator
1.8
Not less than: evaluates to true unless argument1 is numerically less than argument2.
argument1 >= argument2
if (self.number >= 6) ...;
33.0
Introduces an assembly-language opcode.
in an output string
1.14
32.0
Introduces an escaped character. Use @@64 to output a literal @.
| @`A | À | @`O | Ò | |
| @`a | à | @`o | ò | |
| @'A | Á | @'O | Ó | |
| @'a | á | @'o | ó | |
| @^A | Â | @^O | Ô | |
| @^a | â | @^o | ô | |
| @~A | Ã | @~O | Õ | |
| @~a | ã | @~o | õ | |
| @:A | Ä | @:O | Ö | |
| @:a | ä | @:o | ö | |
| @oA | Å | @\O | Ø | |
| @oa | å | @\o | ø | |
| @AE | Æ | @OE | OE ligature | |
| @ae | æ | @oe | oe ligature | |
| @cC | Ç | @`U | Ù | |
| @cc | ç | @`u | ù | |
| @`E | È | @'U | Ú | |
| @`e | è | @'u | ú | |
| @'E | É | @^U | Û | |
| @'e | é | @^u | û | |
| @^E | Ê | @:U | Ü | |
| @^e | ê | @:u | ü | |
| @:E | Ë | @'Y | Ý | |
| @:e | ë | @'y | ý | |
| @`I | Ì | @ss | ß | |
| @`i | ì | @ET | Ð | |
| @'I | Í | @et | ð | |
| @'i | í | @TH | Þ | |
| @^I | Î | @th | þ | |
| @^i | î | @LL | £ | |
| @:I | Ï | @!! | ¡ | |
| @:i | ï | @?? | ¿ | |
| @~N | Ñ | @<< | « | |
| @~n | ñ | @>> | » |
in an output string
1.14
32.0
Introduces a reference to a string pseudo-variable. See string.
in an output string
1.14
32.0
Introduces a character given by its decimal value.
| @@64 | @ | @@94 | ^ | |
| @@92 | \ | @@126 | ~ |
directive
1.2
1.6
3.5
Surround the declaration of a routine: a self-contained code fragment which returns a value. There are two main forms of routine:
The simplest standalone routine declaration runs to completion and returns true:
identifier();
...
[ identifier;
statement;
statement;
...
];
A routine can contain multiple exit points, and can return specific values (see return rfalse rtrue):
if (identifier()) ...;
...
[ identifier;
statement;
statement;
...
if (boolean_expression) rfalse;
rtrue;
];
A routine can declare local variables and take between zero and seven arguments (which simply initialise those variables). If more arguments are supplied in the call than declared in the routine, the excess arguments are IGNORED???. If more arguments are declared in the routine than supplied in the call, the missing variables are set equal to zero.
my_counter = identifier(argument1, argument2, ...);
...
[ identifier variable1 variable2 ...;
statement;
statement;
...
return some_value;
];
1.14
Obsolete line continuation character. Use @@92 to output a literal \.
in an output string
1.14
Outputs a newline character. Use @@94 to output a literal ^.
print "^^Blank lines before and after^^";
10.0
Includes an apostrophe character in a dictionary word.
1.10
Surround multiple statements to form a code block which is treated as a single statement.
if (boolean_expression) {
statement;
statement;
...;
}
operator
1.5
Performs sixteen-bit bitwise OR in an expression.
$1234 | $00FF ! Evaluates to $12FF
comparative operator
1.8
Logical OR: joins two elements into a boolean_expression which is true if either element is true.
boolean_expression || boolean_expression
if (self.number < 3 || self.number > 5) ...;
operator
1.5
Performs sixteen-bit bitwise NOT in an expression.
~$1234 ! Evaluates to $EDCB
in an output string
1.14
Outputs a quotes " character. Use @@126 to output a literal ~.
print "This ~word~ is in quotes";
comparative operator
1.8
Not equal to: evaluates to true unless argument1 is numerically equal to argument2.
argument1 ~= argument2
if (self.number ~= 4) ...;
comparative operator
1.8
Logical NOT: turns an element into a boolean_expression which is true if the element is false, and vice versa.
~~ boolean_expression
if (~~ (self.number == 3 or 4 or 5)) ...;
obscure directive
31.0
Defines commonly-occurring strings which can be stored as tokens in order to save space.
Abbreviate "string" "string" ...;
attribute
10.0
A5.0
For a floating object (one with a found_in property, which can appear in many rooms): is no longer to be found in those rooms.
routine
20.0
A7.0
Marks a scored task as having been achieved. See also NUMBER_TASKS PrintTaskName task_scores TASKS_PROVIDED.
Achieved(task)
variable
9.0
Contains the current action.
THREAD
THREAD
THREAD
9.0
A8.0
A single act attempted by the player. Generated by the parser, after interpretation of the typed command, as action noun second. Actions fall into three groups:
9.0
The routine which implements the behaviour of the action.
[ actionSub; statement; statement; ...; ];
group 1 debug action
30.0
Receives verb ACTIONS OFF. Disables tracing of all actions.
>ACTIONS OFF
group 1 debug action
30.0
Receives verbs ACTIONS [ON]. Enables tracing of all actions.
>ACTIONS >ACTIONS ON
variable
26.0
Contains the person being told to do something, usually the player.
property
A6.0
For an object: additional objects which follow this object in and out of scope. The value of the property can be:
add_to_scope object object ... add_to_scope [; AddToScope(object); AddToScope(object); ...; ]
See Property.
routine
28.0
A7.0
Used in an add_to_scopes routine to bring a second object into scope whenever the first object is in scope.
AddToScope(object)
additive property
A6.0
For an object: receives every action and fake_action for which this is the noun.
For a room: receives every action which occurs here.
In both cases, the property is invoked after the action has happened, but before the player has been informed. The value of the property is an embedded routine of structure similar to a switch statement, having cases for the appropriate actions (and an optional default as well). The routine should return false to continue, telling the player what has happened, or true to stop processing the action without producing any output. See also before react_after react_before.
after [;
action: statement; statement; ...;
action: statement; statement; ...;
...
]
entry_point
19.0
A10.0
If defined, called when the player has died. Setting deadflag to zero resurrects the player.
[ AfterLife; statement; statement; ...; ];
entry_point
32.0
A10.0
If defined, called just after the > prompt is output.
[ AfterPrompt; statement; statement; ...; ];
routine
9.0
In a group 2 action, sends suitable after messages.
AfterRoutines()
routine
14.0
A7.0
Marks the object as capable of being pushed from one location to another.
AllowPushDir()
entry_point
20.0
A10.0
If defined (and if AMUSING_PROVIDED is defined), called when the player has won.
[ Amusing; statement; statement; ...; ];
constant
20.0
A10.0
Must be defined to activate the Amusing entry_point; its value is immaterial.
Constant AMUSING_PROVIDED;
attribute
22.0
A5.0
For an object: is alive. See also life.
group 3 action
9.0
16.0
A8.0
Receives verbs ANSWER TO SAY TO SHOUT TO SPEAK TO.
directive
2.3
Declares an array: a collection of global variables where each entry can be individually addressed by a zero-based index number.
The two major classes of array are the eight-bit byte array (each entry holds a value in the range 0..255) and the sixteen-bit word array (each entry holds a value in the range -32768..32767).
The first form creates an array of bytes:
Array identifier -> numeric_constant; Array identifier -> numeric_constant numeric_constant ...; Array identifier -> "string";
The second form creates an array of words:
Array identifier --> numeric_constant; Array identifier --> numeric_constant numeric_constant ...; Array identifier --> "string";
For both forms:
There are extended forms of the byte and word array, in which the first (0th) entry is initialised to the number of entries which follow. The third form creates a sized array of bytes:
Array identifier string numeric_constant; Array identifier string numeric_constant numeric_constant ...; Array identifier string "string";
The fourth form creates a sized array of words:
Array identifier table numeric_constant; Array identifier table numeric_constant numeric_constant ...; Array identifier table "string";
For both extended forms:
Once a byte or word array has been declared, an entry can be addressed using the syntax:
identifier->number ! For a byte array identifier-->number ! For a word array
If an object property is defined as an array, an entry in that array can be addressed using the syntax:
object.&property-->number number_of_entries = object.#property / 2
property
22.0
A6.0
For an object: the objects indefinite article - the default is automatically a an or some. The value of the property can be:
article "string" article [; statement; statement; ...; ]
obscure property
A6.0
group 3 action
9.0
16.0
A8.0
Receives verb ASK ABOUT.
group 3 action
9.0
A8.0
Receives verb ASK FOR.
statement
1.4
Evaluates an expression and assigns the result to a variable.
variable = expression;
self.number = 5;
group 3 action
9.0
16.0
A8.0
Receives verbs ATTACK BREAK CRACK DESTROY FIGHT HIT KILL MURDER PUNCH SMASH THUMP TORTURE WRECK.
directive
3.7
Declares an attribute: an absent/present flag variable which can be associated with objects at compile-time by has, and at run-time by give. An attribute must be declared before it can be associated with objects.
The operators has and hasnt test if a given attribute is currently associated with a given object.
Attribute identifier;
A second form defines an alias for an existing attribute:
Attribute identifier alias attribute;
THREAD
3.7
A5.0
The identifier of an attribute, declared using Attribute.
additive property
A6.0
For an object: receives every action and fake_action for which this is the noun.
For a room: receives every action which occurs here.
In both cases, the property is invoked before the action has happened. The value of the property is an embedded routine of structure similar to a switch statement, having cases for the appropriate actions (and an optional default as well). The routine should return false to continue, or true to stop processing the action without producing any output. See also after react_after react_before.
before [;
action: statement; statement; ...;
action: statement; statement; ...;
...
]
entry_point
26.0
A10.0
If defined, called when the parser has input some text, set up the buffer and parse tables, and initialised wn to 1, but done nothing else.
[ BeforeParsing; statement; statement; ...; ];
group 3 action
9.0
A8.0
Receives verb BLOW.
See style.
statement
1.14
32.0
Outputs a inverse-video box containing multiple lines of text.
box "string" "string" ...;
statement
1.11
Exits from a loop or switch.
do {
...
break;
...
} until (boolean_expression);
! after break, execution resumes here
for (initialise : boolean_expression : update) {
...
break;
...
}
! after break, execution resumes here
switch (expression) {
...
constant: ... break; ...
...
}
! after break, execution resumes here
while (boolean_expression) {
...
break;
...
}
! after break, execution resumes here
group 3 action
9.0
A8.0
Receives verbs BURN [WITH] LIGHT [WITH].
group 3 action
9.0
A8.0
Receives verbs BUY PURCHASE.
See message.
property
A6.0
For a room: the message when the player attempts an impossible exit - the default is You can't go that way. The value of the property can be:
cant_go "string" cant_go [; statement; statement; ...; ]
property
A6.0
For a container or supporter object: the number of objects which can be placed in or on it - the default is 100.
For the player: the number of objects which can be carried - selfobj (the default player) has an initial capacity of MAX_CARRIED.
In both cases, the value of the property can be:
capacity numeric_constant capacity [; statement; statement; ...; ]
routine
A7.0
Outputs The and the objects short name. (Equivalent to print (The) object.)
CDefArt(object)
See u_obj.
routine
21.0
A7.0
Changes the default value of a common property which is returned by an object not actually providing that property.
ChangeDefault(property, value)
routine
19.0
22.0
A7.0
Causes the player to assume the persona of the object (which must have declared a number property). If the optional flag is true, room description headers include the string (as object).
ChangePlayer(object, flag)
group 1 debug action
Receives verb CHANGES OFF. Disables reporting of all state changes.
>CHANGES OFF
group 1 debug action
Receives verbs CHANGES [ON]. Enables reporting of all state changes.
>CHANGES >CHANGES ON
routine
3.2
Returns the object which is contained by (is the child of) its object argument; returns nothing if the argument has no child. See also children parent sibling.
child(argument)
routine
3.2
Returns the number of objects which are contained by (as child plus any sibling(s) of that child, but omitting any of their children) its object argument; returns zero if the argument has no child. See also child parent sibling.
children(argument)
entry_point
29.0
A10.0
If defined, called when the parser has encountered an ALL and has decided that object should be excluded (flag is 0), or included (flag is 1). The routine should return 0 to let this stand, 1 to force inclusion, or 2 to force exclusion. If flag is 2, the parser is undecided, and the routine should return an appropriate score 0..9.
[ ChooseObjects object flag; statement; statement; ...; ];
directive
3.8
3.13
Declares a class: a prototype for a family of objects. The (number) is optional and generally omitted; it defines the number of instances of this class which can be created at run-time, and defaults to zero - see message.
Class identifier(number) body;
Once the class exists, compile-time instances of it are declared using the same syntax as Object:
class identifier "string" body; class identifier "string" parent_object body; class -> identifier "string" body; class -> -> ... identifier "string" body;
Class myRoom has light; myRoom entrance_hall ...;
3.8
Declares one or more additional classes from which this object inherits pre-defined routines and variables. See Class Object.
class class class ...
3.8
The identifier of a class, declared using Class. One of Informs four metaclass types - see also object routine string.
group 3 action
9.0
A8.0
Receives verbs CLIMB [OVER|UP] SCALE.
group 2 action
9.0
A8.0
Receives verbs CLOSE [UP] COVER [UP] SHUT [UP].
attribute
A5.0
For an object: is capable of being worn.
group 1 debug action
30.0
Receives verb RECORDING OFF. Enables creation of a transcript.
>RECORDING OFF
group 1 debug action
30.0
Receives verbs RECORDING [ON]. Disables creation of a transcript.
>RECORDING >RECORDING ON
group 1 debug action
30.0
Receives verb REPLAY. Activates rerun of a transcript.
>REPLAY
special object
10.0
A7.0
A container object holding the twelve direction objects d_obj e_obj in_obj n_obj ne_obj nw_obj out_obj s_obj se_obj sw_obj u_obj w_obj. The d_obj object has a door_dir property of d_to, and a command like LOOK AT THE FLOOR is mapped to an Examine d_obj action; similarly for the other directions.
attribute
A5.0
For an object: is present but hidden from view.
directive
2.1
Defines a global constant. By convention, the identifier is in uppercase. If the constant is omitted, the constant is created with a value of zero.
Constant identifier constant;
THREAD
2.1
A10.0
A sixteen-bit value, evaluated at compile-time, which can be:
group 3 action
9.0
15.0
A8.0
Receives verbs CONSULT ABOUT|ON LOOK UP IN READ ABOUT IN READ IN.
attribute
14.0
A5.0
For an object: other objects can be placed in it.
statement
1.11
Ends the current iteration of a loop.
do {
...
continue;
...
! after continue, execution resumes here
} until (boolean_expression);
for (initialise : boolean_expression : update) {
...
continue;
...
! after continue, execution resumes here
}
while (boolean_expression) {
...
continue;
...
! after continue, execution resumes here
}
See message.
See message.
group 3 action
9.0
A8.0
Receives verbs CHOP CUT PRUNE SLICE.
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
property
18.0
A6.0
An embedded routine which can be activated by StartDaemon and which then runs once each turn until deactivated by StopDaemon.
daemon [; statement; statement; ...; ]
entry_point
17.0
A10.0
If defined, called when the player has moved from one dark room to another.
[ DarkToDark; statement; statement; ...; ];
variable
7.0
19.0
Normally contains zero. Can be set to 2 to indicate that the player has won, 1 to indicate a regular death, 3 or more to indicate an unusual death.
constant
If defined, offers UNDO the last move as one of the options when the game is over; its value is immaterial.
Constant DEATH_MENTION_UNDO;
entry_point
19.0
A10.0
If defined, called when the player has died and deadflag is 3 or more.
[ DeathMessage; statement; statement; ...; ];
constant
30.0
A10.0
Must be defined to activate the group 1 debugging commands; its value is immaterial.
Constant DEBUG;
routine
A7.0
Outputs the and the objects short name. (Equivalent to print (the) object.)
DefArt(object)
obscure directive
4.2
Declares a Constant unless it already exists.
Default identifier constant;
See switch.
additive property
22.0
A6.0
For an object: called before the objects description is output.
For a room: called before the rooms (long) description is output.
In both cases, the value of the property is an embedded routine which should return false to continue, outputting the usual description, or true to stop processing without producing any further output.
describe [; statement; statement; ...; ]
property
22.0
A6.0
For an object: its description (output by Examine).
For a room: its long description (output by Look).
The value of the property can be:
description "string" description [; statement; statement; ...; ]
See message.
obsolete directive
group 3 action
9.0
A8.0
Receives verbs DIG [WITH].
THREAD
A3.0
An instruction defining compile-time behaviour.
group 2 action
9.0
A8.0
Receives verbs DISROBE DOFF REMOVE SHED TAKE OFF.
statement
1.11
Executes a statement for as long as the boolean_expression is false. The statement can be a code block enclosed in {...}. If the expression is initially true, the statement is nevertheless executed once. See also break continue.
do statement until (boolean_expression);
routine
32.0
A7.0
Implements a simple menu system.
DoMenu("string", routine1, routine2)
attribute
12.0
A5.0
For an object: is a door or bridge between rooms.
property
12.0
A6.0
For a compass object (d_obj, e_obj, ...): the direction in which an attempt to move to this object actually leads.
For a door object: the direction in which this door leads.
In both cases, the value of the property can be:
door_dir directional_property door_dir [; statement; statement; ...; ]
property
A6.0
For a door object: where this door leads. The value of the property can be:
routine
21.0
32.0
Outputs the status line.
Replace DrawStatusLine; ... [ DrawStatusLine; statement; statement; ...; ]
group 3 action
9.0
A8.0
Receives verbs DRINK SIP SWALLOW.
group 2 action
9.0
A8.0
Receives verbs DISCARD DROP PUT DOWN THROW.
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
additive property
18.0
A6.0
Invoked at the end of each turn (after all appropriate daemons and timers) whenever the object is in scope. The value of the property can be:
each_turn "string" each_turn [; statement; statement; ...; ]
group 2 action
9.0
A8.0
Receives verb EAT.
attribute
A5.0
For an object: is capable of being eaten.
See if.
group 2 action
9.0
A8.0
Receives verbs EMPTY [OUT].
group 2 action
9.0
A8.0
Receives verbs EMPTY IN|INTO|ON|ONTO|TO.
directive
Marks the end of the program; text from here to the end of file is ignored.
routine
A7.0
Outputs its numeric argument in English words.
EnglishNumber(argument)
group 2 action
9.0
A8.0
Receives verbs CROSS ENTER GET IN|INTO|ON|ONTO GO IN|INSIDE|INTO|THROUGH LEAVE IN|INSIDE|INTO|THROUGH LIE IN|INSIDE|ON LIE ON TOP OF RUN IN|INSIDE|INTO|THROUGH SIT IN|INSIDE|ON SIT ON TOP OF STAND ON WALK IN|INSIDE|INTO|THROUGH.
attribute
14.0
A5.0
For an object: is capable of being entered.
THREAD
A10.0
Optional routine which, if defined, is called at an appropriate point in the game.
group 2 action
9.0
A8.0
Receives verbs CHECK DESCRIBE EXAMINE L[OOK] AT READ WATCH X.
group 2 action
9.0
A8.0
Receives verbs EXIT GET OFF|OUT|UP LEAVE OUT[SIDE] STAND [UP].
1.5
directive
26.0
27.0
Extends the behaviour of an existing dictionary word. See also Verb. how specifies the manner of the extension, and can be one of:
The first form affects an existing word and all of its synonyms:
Extend "verb" how
* token token ... -> action reverse
...;
The second form affects only the specified words, leaving the behaviour of other synonyms unchanged:
Extend only "verb" "verb" ... how
* token token ... -> action reverse
...;
obscure directive
9.0
Fake_action identifier;
THREAD
9.0
11.0
A8.0
An artificial form of action without a corresponding action routine, generated by the parser in certain circumstances.
constant
1.4
Logical FALSE (decimal 0).
attribute
22.0
A5.0
For an animate object: is female.
group 3 action
9.0
A8.0
Receives verb FILL.
See Extend.
See style.
See d_obj.
statement
1.14
32.0
Switches between standard and fixed-pitch fonts.
font off; ! Use fixed-pitch font font on; ! Use standard (proportional) font
statement
1.11
Executes a statement for as long as the boolean_expression is true. The statement can be a code block enclosed in {...}. If the expression is initially false, the statement is never executed. See also break continue.
for (initialise : boolean_expression : update) statement;
initialise is an assignment which gives an initial value to a loop variable, boolean_expression tests that variable at the start of each loop, and update is an assignment which changes the variable at the end of each loop. All three elements are optional. Equivalent to:
initialise;
while (boolean_expression) {
statement;
update;
}
property
10.0
19.0
A6.0
For an object: the locations where this object can be found, unless it has the absent attribute. The value of the property can be:
found_in object object ... found_in [; statement; statement); ...; ]
See objectloop.
group 1 action
A8.0
Receives verb FULL [SCORE] FULLSCORE.
deprecated entry_point
A10.0
If defined, called after all actions.
[ GamePostRoutine; statement; statement; ...; ];
deprecated entry_point
A10.0
If defined, called before all actions.
[ GamePreRoutine; statement; statement; ...; ];
attribute
A5.0
For an object or room: a general-purpose flag associated with every object, which is freely available for use by the program.
group 2 action
9.0
A8.0
Receives verb GET OFF.
group 2 action
9.0
16.0
A8.0
Receives verbs FEED [TO] GIVE [TO] OFFER [TO] PAY [TO].
statement
3.7
Associates one or more attributes (pre-declared using Attribute) with the object at run-time. If an attribute is introduced by ~, removes that attribute association from the object. See also has.
give object attribute attribute ... ~attribute ~attribute ...;
directive
2.2
Defines a global variable. If the constant is omitted, the variable is created with a value of zero.
Global identifier constant;
group 2 action
9.0
A8.0
Receives verbs GO LEAVE RUN WALK.
group 2 action
9.0
A8.0
Receives verbs CROSS ENTER IN[SIDE].
group 1 debug action
30.0
Receives verb GONEAR. Moves the player to the room containing a specified object.
>GONEAR object
group 1 debug action
30.0
Receives verb GOTO. Moves the player to the specified room_number.
>GOTO room_number
7.0
26.0
Library file containing Informs English grammar. See program
Include Grammar;
property
16.0
A6.0
For an animate or talkable object: an embedded routine called when the parser knows that this object is being addressed, but has yet to test the grammar.
The routine should return false to continue, true to indicate that the routine has parsed the entire command, or a dictionary word ('word' or -'word').
grammar [; statement; statement); ...; ]
comparative operator
1.8
3.7
Evaluates to true if object currently has associated attribute.
object has attribute
if (location has general) ...;
3.7
Associates one or more attributes (pre-declared using Attribute) with the object at compile-time. See Class Object. If an attribute is introduced by ~, removes that attribute association from the object. See also give.
has attribute attribute ... ~attribute ~attribute ...
routine
17.0
A7.0
Returns true if the object has light. See also OffersLight.
HasLightSource(object)
comparative operator
1.8
Evaluates to true if object does not currently have associated attribute.
object hasnt attribute
if (location hasnt light) ...;
mandatory constant
20.0
A10.0
Game style, copyright information, and so on.
Constant Headline "string";
1.4
Up to 32 characters, from the set A..Za..z0..9_; uppercase and lowercase letters are treated as equivalent. The first character cannot be a digit.
my_counter my_entrance_hall
statement
1.8
1.10
Executes a statement if the boolean_expression is true; optionally executes another statement if the expression is false. Each statement can be a code block enclosed in {...}.
if (boolean_expression)
statement; ! executed if boolean_expression is true
if (boolean_expression)
statement; ! executed if boolean_expression is true
else
statement; ! executed if boolean_expression is false
directive
4.2
Compiles source code if the identifier is defined; optionally, compiles alternative code if the identifier is undefined.
Ifdef identifier;
...
Endif;
Ifdef identifier;
...
Ifnot;
...
Endif;
directive
4.2
Compiles source code if the boolean_expression is false; optionally, compiles alternative code if the expression is true.
Iffalse condition;
...
Endif;
Iffalse condition;
...
Ifnot;
...
Endif;
directive
4.2
Compiles source code if the identifier is undefined; optionally, compiles alternative code if the identifier is defined.
Ifndef identifier;
...
Endif;
Ifndef identifier;
...
Ifnot;
...
Endif;
directive
4.2
Compiles source code if the boolean_expression is true; optionally, compiles alternative code if the expression is false.
Iftrue boolean_expression;
...
Endif;
Iftrue boolean_expression;
...
Ifnot;
...
Endif;
obsolete directive
obsolete directive
obscure directive
4.3
Import global identifier, global identifier, ...;
comparative operator
1.8
3.4
Evaluates to true if object is currently the child of (possessed by) the parent_object. (Equivalent to parent(object) == parent_object.) See also IndirectlyContains.
object in parent_object
if (my_lamp in player) ...;
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
directive
4.2
4.3
21.0
Includes the contents of a source file into the program being compiled. The files extension can be omitted. See also Link.
Include "file";
routine
A7.0
Outputs a|an|some and the objects short name. (Equivalent to print (a) object.)
InDefArt(object)
routine
1.16
Calls a routine whose name is evaluated at run-time.
indirect(routine, argument1, argument2, ...)
(Equivalent to routine(argument1, argument2, ...), except that the value of routine - the numeric equivalent of a routine - is evaluated when the program runs rather than when it is compiled.)
routine
Returns true if object is currently a child or grandchild or great-grandchild... of the parent_object. See also in.
IndirectlyContains(parent_object, object)
obscure object
A7.0
obscure object
A7.0
property
19.0
A6.0
For an object: its description before being picked up.
For a room: its description when the player enters the room.
The value of the property can be:
initial "string" initial [; statement; statement; ...; ]
mandatory entry_point
19.0
A10.0
Called at the start of a game. Must assign an appropriate location.
[ Initialise; statement; statement; ...; ];
entry_point
18.0
28.0
A10.0
If defined, called during parsing.
[ InScope; statement; statement; ...; ];
group 2 action
9.0
A8.0
Receives verbs DISCARD IN|INTO DROP DOWN|IN|INTO INSERT IN|INTO PUT IN|INSIDE|INTO THROW DOWN|IN|INTO.
property
14.0
A6.0
For an enterable object: its description, output as part of the room description when the player is inside the object.
The value of the property can be:
inside_description "string" inside_description [; statement; statement; ...; ]
group 2 action
9.0
A8.0
Receives verb I[NV] INVENTORY TAKE INVENTORY.
property
22.0
A6.0
For an object: an embedded routine for outputting the objects inventory listing, which is called twice.
On the first call nothing has been output; inventory_stage has the value 1, and the routine should return false to continue or true to stop processing and produce no further output.
On the second call the objects indefinite article and short name have been output, but not any subsidiary information; inventory_stage has the value 2, and the routine should return false to continue or true to stop processing and produce no further output.
invent [;
switch (inventory_stage) {
1: statement;
...
return expression;
2: statement;
...
return expression;
}
]
variable
22.0
23.0
See invent list_together.
statement
1.14
Outputs the version number of Inform used to compile the program.
inversion;
group 2 action
9.0
A8.0
Receives verbs I[NV] TALL INVENTORY TALL.
group 2 action
9.0
A8.0
Receives verbs I[NV] WIDE INVENTORY WIDE.
group 3 action
9.0
A8.0
Receives verbs HOP JUMP SKIP.
deprecated statement
1.13
Resumes execution at the location marked with the label.
jump identifier;
group 3 action
9.0
A8.0
Receives verbs HOP OVER JUMP OVER SKIP OVER.
variable
9.0
Normally contains 0; can be set to 1 to cause most group 2 actions to happen silently.
group 3 action
9.0
16.0
A8.0
Receives verbs EMBRACE HUG KISS.
1.13
The destination of a jump or save.
.identifier;
See Extend.
fake_action
11.0
Generated by Remove, for possible use by the target of the retrieval.
special object
21.0
If defined, changes the standard library messages.
Object LibraryMessages
with before [;
action: "string";
action: "string";
...
];
additive property
16.0
A6.0
For an animate object: receives person-to-person actions (Answer Ask Attack Give Kiss Order Show Tell ThrowAt WakeOther) for which this is the noun. The value of the property is an embedded routine of structure similar to a switch statement, having cases for the appropriate actions (and an optional default as well). The routine should return false to continue, telling the player what has happened, or true to stop processing the action without producing any output.
life [;
action: statement; statement; ...;
action: statement; statement; ...;
...
]
attribute
17.0
A5.0
For an object or room: is giving off light.
directive
4.3
Includes the contents of a pre-compiled module into the program being compiled. The files extension can be omitted. See also Include.
Link "file";
property
23.0
A6.0
For an object: collects related objects into a group when outputting an inventory or room contents list. The value of the property can be:
list_together number
list_together "string"
list_together [;
switch (inventory_stage) {
1: statement;
...
return expression;
2: statement;
...
}
]
group 3 action
9.0
A8.0
Receives verbs HEAR LISTEN [TO].
obscure fake_action
group 1 action
A8.0
Receives verbs BRIEF NORMAL.
group 1 action
A8.0
Receives verbs LONG VERBOSE.
group 1 action
A8.0
Receives verbs SHORT SUPERBRIEF.
routine
22.0
A7.0
Outputs the paragraphs of object content description according to the usual rules. After describing the objects which have their own paragraphs, a list is given on the remaining ones, preceded by string1 if there were no previous paragraphs, or string2 otherwise. The routine returns the number of objects in the list (possibly zero).
Locale(object, string1, string2)
variable
19.0
Contains the players current room, unless that room is dark, when it contains thedark (and real_location contains the room).
group 2 action
9.0
A8.0
Receives verb LOCK WITH.
attribute
A5.0
For an object: is capable of being locked and unlocked.
attribute
A5.0
For an object: is incapable of being opened.
group 2 action
9.0
A8.0
Receives verbs [L]OOK.
entry_point
A10.0
If defined, called at the end of every Look description.
[ LookRoutine; statement; statement; ...; ];
group 3 action
9.0
A8.0
Receives verb LOOK UNDER.
routine
28.0
A7.0
Calls routine(object) for each object in scope. If the optional actor is supplied, the scope is calculated for that actor rather than for the player.
LoopOverScope(routine, actor)
directive
1.14
32.0
Declares a named string constant. See also string.
Lowstring identifier "string";
attribute
22.0
A5.0
For an animate object: is male.
constant
If defined, the parser won't automatically update pronoun settings to follow items mentioned in inventory listings or room descriptions (so that pronouns will reflect only what the player actually types); its value is immaterial.
Constant MANUAL_PRONOUNS;
constant
20.0
A10.0
The maximum number of (direct) possessions that the player can carry. The default is 100.
Constant MAX_CARRIED number;
constant
20.0
A10.0
The maximum game score (for the status line). The default is 0.
Constant MAX_SCORE number;
constant
18.0
A10.0
The maximum number of timers and daemons active at any one time. The default is 32.
Constant MAX_TIMERS number;
obscure directive
4.2
Outputs a compile-time message in one of four categories.
Message "string"; Message error "string"; Message fatalerror "string"; Message warning "string";
3.9
3.12
8.0
21.0
A request from a sender, usually an object, for another object to perform some activity. The message request may contain zero, one or more arguments, and always receives a single value in reply. There are thirteen possible message types, determinded by the metaclass of the object receiving the message.
Classes accept five message types, all concerned with the construction of run-time instances of objects of the class. copy sets object1 so that it has the attributes and properties of object2, and replies WHAT? create replies with a new object instance. (The class may optionally supply a create property to handle object initialisation, using the supplied arguments.) destroy removes an object instance, and replies WHAT? (The class may optionally supply a destroy property to handle object destruction.) recreate is equivalent to destroy then create. remaining replies with the number of run-time instances which may still be created.
class.copy(object1, object2) class.create(argument1, argument2, ...) class.destroy(object) class.recreate(object, argument1, argument2, ...) class.remaining(object)
Objects accept five message types, determined by the metaclass of the property to which the messages is directed. When the property is a Routine, the message invokes the routine with the supplied arguments and replies with the routines return value. When the property is a String, the message outputs the string followed by newline, and replies with true. When the property is a Class, or Object, nothing happens and the reply is the class or object. When the property is none of these, nothing happens and the reply is false.
object.routine_property(argument1, argument2, ...) object.string_property() object.class_property() object.object_property() object.other_property()
Routines accept only one message type. call invokes the routine with the supplied arguments and replies with the routines return value:
routine.call(argument1, argument2, ...)
Strings accept two message types. print simply outputs the string followed by newline, and replies with true. print_to_array writes the strings characters to the byte array; the number of characters in the string is stored as a word in the first two bytes of the array, and is also the message reply:
string.print() string.print_to_array(byte_array)
See Verb.
routine
3.1
Returns the metaclass of its argument: 4 for a string, 3 for a routine, 2 for an object 1 for a class, or 0 otherwise.
metaclass(argument)
group 3 action
9.0
A8.0
Receives mild swearwords.
obscure fake_action
statement
3.4
Relocates an object (and all of its children) in the object-tree. The object becomes the eldest child of the parent_object, and any previous child of the parent_object becomes the sibling of the object. See also remove.
move object to parent_object;
attribute
A5.0
For an object: is being, or has been, taken by the player.
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
additive property
3.5
24.0
25.0
A6.0
Defines one or more words which are added to the Inform dictionary. Note that the words can be surrounded in apostrophes '...' or quotes "..."; in all other circumstances only words in apostrophes update the dictionary.
For an object: identifies this object.
For a room: outputs does not need to be referred to.
name "word" "word" ...
name "big" "red" "bus" "omnibus" "charabanc" "coach"
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
See objectloop.
obsolete directive
attribute
22.0
A5.0
statement
1.14
Outputs a newline. (Equivalent to print "^".)
entry_point
19.0
A10.0
If defined, called when the room changes, before any description is printed.
[ NewRoom; statement; statement; ...; ];
routine
24.0
A7.0
Returns the next dictionary word in the input stream, incrementing wn by one. Returns false if the word is not in the dictionary, or if the input stream is exhausted.
NextWord()
routine
A7.0
Returns the next dictionary word in the input stream, incrementing wn by one. Returns false if the word is not in the dictionary. Returns -1 if the input stream is exhausted.
NextWord()
group 3 action
9.0
A8.0
Receives verb NO.
constant
20.0
A10.0
Must be defined to indicate that the OBJECTS and PLACES verbs are not allowed; its value is immaterial.
Constant NO_PLACES;
constant
3.2
Not an object.
variable
20.0
Normally contains true. Can be set to false to prevent notifying the player when the score changes.
group 1 action
A8.0
Receives verb NOTIFY OFF.
group 1 action
A8.0
Receives verbs NOTIFY [ON].
comparative operator
1.8
Evaluates to true if object is not currently the child of (not possessed by) the parent_object.
object notin parent_object
if (player notin my_maze_1 or my_maze_2 or my_maze_3) ...;
fake_action
16.0
Generated when the parser fails to interpret some orders.
variable
9.0
Contains the object (or occasionally number) which is the primary focus of the current action.
obscure routine
A7.0
constant
7.0
No value for this property.
property
A6.0
For an object or room: a general-purpose variable associated with every object, which is freely available for use by the program.
1.4
Sixteen-bit signed integer, holding a decimal value in the range -32768..32767. Use $ to introduce a hexadecimal value, $$ to introduce a binary value, and '...' to specify the numeric equivalent of an ASCII character.
123 -1 $FFFF $$101 'A'
constant
20.0
A10.0
The number of scored tasks to be performed. The default is 1. See also Achieved PrintTaskName task_scores TASKS_PROVIDED.
Constant NUMBER_TASKS number;
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
directive
3.3
3.5
Declares an object: a collection of routines and variables.
The object is known within the program by its identifier, though the short name string is used if the program needs to output the objects name.
Objects are linked into a tree structure such that each object has a single parent, sibling and child, each of is either another object, or nothing. The first form defines an object with no parent:
Object identifier "string" body;
In the second form, the parent_object is some previously-defined object which (at least initially) contains this object (objects can be transferred between parents at run-time, using move).
Object identifier "string" parent_object body;
In the third form, an object definition with one arrow is a child of the nearest-previous object with no parent, an object definition with two arrows is a child of the nearest-previous object with one arrow, and so on.
Object -> identifier "string" body; Object -> -> ... identifier "string" body;
In all cases, the objects body is some comma-separated combination of four optional segments:
THREAD
3.1
A7.0
The identifier of an object, declared using Object. One of Informs four metaclass types - see also class routine string.
constant
20.0
A10.0
The score for picking up a scored object for the first time. The default is 4.
Constant OBJECT_SCORE number;
routine
28.0
A7.0
Tests if there is a barrier - a container object which is not open - between the player and the object. Unless the optional flag is true, outputs You can't because ... is in the way. Returns true is a barrier is found, otherwise false.
ObjectIsUntouchable(object, flag)
statement
3.4
3.8
Executes a statement for some or all objects in the tree. The variable is set in turn to each object.
objectloop (variable) statement; objectloop (boolean_expression) statement;
The first form finds all objects. In the second form, the loop is executed only for those objects selected by the boolean_expression (which must begin with a variable). Three special forms of boolean_expression cycle through the object tree instead of simply looping over all objects in the game. When using these forms, be very careful about altering the tree as you are traversing it:
objectloop (my_obj) print (name) my_obj, "^"; objectloop (my_obj in my_entrance_hall) print (name) my_obj, "^";
group 1 action
A8.0
Receives verb OBJECTS.
comparative operator
1.8
Evaluates to true if object inherits from class.
object ofclass class
if (my_entrance_hall ofclass myRoom) ...;
See font.
routine
17.0
A7.0
Returns true if object offers light. See also HasLightSource.
OffersLight(object)
attribute
13.0
A5.0
For a switchable object: is switched on.
See font.
See Extend.
group 2 action
9.0
A8.0
Receives verbs OPEN UNCOVER UNDO UNWRAP.
attribute
A5.0
attribute
A5.0
THREAD
1.5
A1.0
Used with constants and variables in the construction on an expression.
comparative operator
1.8
Separator for alternative comparison values.
if (self.number == 3 or 4 or 5) ...;
fake_action
16.0
Receives anything not handled by orders.
property
19.0
A6.0
For an animate or talkable object: an embedded routine called to carry out the players orders.
The routine should return false to continue, or true to stop processing the action without producing any output.
orders [; statement; statement); ...; ]
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
THREAD
1.14
Special characters which can be included in the strings passed to output statements. See "..." print print_ret.
routine
3.2
Returns the object which contains (is the parent of) its object argument; returns nothing if the argument has no parent. See also child children sibling.
parent(argument)
property
24.0
25.0
26.0
A6.0
For an object: an embedded routine called to parse an objects name. The routine should return zero if the text makes no sense, -1 to cause the parser to resume, or the positive number of words matched.
parse_name [; statement; statement); ...; ]
entry_point
A10.0
If defined, called to parse the objects name.
[ ParseNoun object; statement; statement; ...; ];
entry_point
27.0
A10.0
If defined, provides an alternative opportunity to parse a number.
[ ParseNumber byte_number length; statement; statement; ...; ];
4.3
7.0
20.0
21.0
Library file containing Informs main parser program. See program
Include Parser;
entry_point
29.0
A10.0
If defined, provides an opportunity to output an alternative for the error number.
[ ParserError number; statement; statement; ...; ];
routine
28.0
A7.0
Puts the object into scope for the parser.
PlaceInScope(object)
group 1 action
A8.0
Receives verb PLACES.
variable
19.0
Contains the object which is undertaking the game on behalf of the human player.
The human being who types commands at the keyboard in response to information which is output by the program.
routine
19.0
A7.0
Moves the player to object. Unless the optional flag is true, describes the players new surroundings.
PlayerTo(object, flag)
property
25.0
A6.0
For an object: its plural form, when in the presence of others like it. The value of the property can be:
plural "string" plural [; statement; statement; ...; ]
obscure fake_action
25.0
attribute
22.0
A5.0
For an object: is plural.
group 3 action
9.0
A8.0
Receives verb PRAY.
group 1 debug action
30.0
Receives verb RANDOM. Makes random number generation deterministic.
>RANDOM
statement
1.14
22.0
Outputs text to the terminal.
print term; print term, term, term, ...;
Each term can be one of:
See message.
statement
1.14
Outputs text to the terminal, followed by a newline, then returns true from the current routine. See print.
print_ret term; print_ret term, term, term, ...;
print_ret "This text is displayed on the terminal.";
See message.
routine
If object.property is a string, outputs that string (followed by a newline unless the optional flag is true), and returns true. If object.property is a routine, invokes that routine and returns whatever the routine returns.
PrintOrRun(object, property, flag)
entry_point
20.0
A10.0
If defined, completes the output of the score.
[ PrintRank; statement; statement; ...; ];
routine
A7.0
Outputs the objects short name. (Equivalent to print (name) object.)
PrintShortName(object)
entry_point
20.0
A10.0
If defined, prints the name of the task. See also Achieved NUMBER_TASKS task_scores TASKS_PROVIDED.
[ PrintTaskName task; statement; statement; ...; ];
entry_point
26.0
A10.0
If defined, called when an unusual verb is printed.
[ PrintVerb number; statement; statement; ...; ];
3.6
Associates one or more private property variables with the object at compile-time. See Class Object.
private property value, property value, ...
The value is normally a single constant, or can be omitted (in which case the property is created with a value of zero). If two or more consecutive values are provided, the property becomes an array - see Array. Finally, the value can be an embedded routine which returns a value or performs an action:
private property [; statement; ... ], ...
7.0
A11.0
The general structure of an Inform program is:
! Switches ...; Constant Story "string"; Constant Headline "string"; ! Constant DEBUG; ! Replace ...; Include "Parser"; ! The command parser. ! Attribute ...; ! Property ...; Include "VerbLib"; ! The standard actions. Object ...; [ Initialise; statement; ...; ]; Include "Grammar"; ! The standard grammar. ! Extend ...; ! Verb ...;
fake_action
21.0
Outputs the prompt message, normally newline then >.
group 1 action
A8.0
Receives verbs NOUNS PRONOUNS.
routine
29.0
Causes an appropriate pronoun to be associated with the specified object. See also MANUAL_PRONOUNS PronounValue SetPronoun.
PronounNotice(object)
routine
29.0
Returns the object to which a pronoun like IT or HIM refers, or nothing. See also MANUAL_PRONOUNS PronounNotice SetPronoun.
PronounValue('pronoun')
attribute
22.0
A5.0
For an object: the short name is a proper noun, therefore not to be preceded by The or the.
directive
3.14
8.0
21.0
Defines a common property which is automatically associated with every Object. Note that only 62 such properties can be defined, and that the Inform library pre-defines around 48 (there is almost no limit on the number of non-common properties created for individual objects). Also, the boolean_expression (object provides property) evaluates to false for a common property.
The word additive is optional and generally omitted; it marks the property as additive (accumulates through class inheritance), without the automatic association - such properties must be explicited included in a Class or Object declaration. If the constant is omitted, the property is created with a value of zero.
Property additive identifier constant;
THREAD
3.5
A6.0
The identifier of a property variable.
comparative operator
1.8
3.5
Evaluates to true if object provides (associated at compile-time) property.
object provides property
if (my_entrance_hall provides my_window_count) ...;
group 3 action
9.0
A8.0
Receives verbs DRAG PULL.
group 3 action
9.0
A8.0
Receives verbs CLEAR MOVE PRESS PUSH SHIFT.
group 3 action
9.0
14.0
A8.0
Receives verbs CLEAR MOVE PRESS PUSH SHIFT.
group 2 action
9.0
A8.0
Receives verbs DISCARD ON|ONTO DROP ON|ONTO PUT ON|ONTO THROW ON|ONTO.
group 1 action
A8.0
Receives verbs DIE Q[UIT].
deprecated statement
1.13
Exits from the program.
routine
1.16
21.0
Returns a random number or constant.
The first form returns a uniformly random number in the range 1..expression (which should be positive).
random(expression)
The second form returns a uniformly random choice of one of the specified constants.
random(constant, constant, ...)
property
A6.0
For an object: detects nearby actions - those which take place when this object is in scope. The property is invoked after the action has happened, but before the player has been informed. The value of the property is an embedded routine of structure similar to a switch statement, having cases for the appropriate actions (and an optional default as well). The routine should return false to continue, or true to stop processing the action without producing any output. See also after before react_before.
react_after [;
action: statement; statement; ...;
action: statement; statement; ...;
...
]
property
10.0
A6.0
For an object: detects nearby actions - those which take place when this object is in scope. The property is invoked before the action has happened. The value of the property is an embedded routine of structure similar to a switch statement, having cases for the appropriate actions (and an optional default as well). The routine should return false to continue, or true to stop processing the action without producing any output. See also after before react_after.
react_before [;
action: statement; statement; ...;
action: statement; statement; ...;
...
]
statement
1.17
2.5
Inputs text from the terminal.
read text_array parse_buffer routine;
variable
19.0
fake_action
11.0
Generated by Insert and PutOn, for possible use by the target of the placement.
See message.
directive
2.5
Specifies the programs release number. The default value is 1.
Release number;
See message.
group 2 action
9.0
A8.0
Receives verbs GET FROM REMOVE FROM TAKE FROM|OFF.
statement
3.4
Separates an object (and all of its children) from its current parent. The parent of the object becomes nothing. See also move.
remove object;
directive
4.2
21.0
Indicates that a library routine is to be replaced by one specified elsewhere in the program.
Replace routine;
See Extend.
group 1 action
A8.0
Receives verb RESTART.
group 1 action
A8.0
Receives verb RESTORE.
statement
1.13
Restores a previously-saved copy of the programs state. If the restore is successful, resumes execution at the location marked with the label on the associated save. If the restore is unsuccessful, execution continues at the next statement.
restore identifier; ! This label apparently not used?
statement
1.9
Exits from a routine, returning true. Optionally, returns a specified value. See also rfalse rtrue.
return; return expression;
See style.
statement
7.0
Exits from a routine, returning false.
rfalse;
See style.
constant
20.0
A10.0
The score for visiting a scored room for the first time. The default is 5
Constant ROOM_SCORE number;
THREAD
A7.0
The identifier of a routine, declared using [...]. One of Informs four metaclass types - see also class object string.
group 1 debug action
30.0
Receives verbs MESSAGES OFF ROUTINES OFF. Disables tracing of messages and routines.
>MESSAGES OFF >ROUTINES OFF
group 1 debug action
30.0
Receives verbs MESSAGES [ON] ROUTINES [ON]. Enables tracing of messages and routines.
>MESSAGES >MESSAGES ON >ROUTINES >ROUTINES ON
statement
7.0
Exits from a routine, returning true.
rtrue;
group 3 action
9.0
A8.0
Receives verbs CLEAN DUST POLISH RUB SCRUB SHINE SWEEP WIPE.
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
constant
20.0
A10.0
A container object like a bag or sack into which the game automatically places held objects.
Constant SACK_OBJECT object;
group 1 action
A8.0
Receives verb SAVE.
statement
1.13
Preserves a copy of the programs current state. If the save is successful, resume execution at the location marked with the label. If the save is unsuccessful, execution continues at the next statement. See restore.
save identifier;
attribute
A5.0
For an object: is incapable of being taken; is not listed in a room description.
group 1 debug action
30.0
Receives verb SCOPE. Displays the scope of the current player, or of another specified player.
>SCOPE >SCOPE player
routine
28.0
A7.0
Puts the contents of object in scope for the parser.
ScopeWithin(object)
group 1 action
A8.0
Receives verb SCORE.
variable
20.0
Contains the current score.
See Statusline.
attribute
19.0
A5.0
For an object: awards the player OBJECT_SCORE points when taking it for the first time.
For a room: awards the player ROOM_SCORE points when visiting it for the first time.
group 1 action
A8.0
Receives verbs NOSCRIPT SCRIPT OFF TRANSCRIPT OFF UNSCRIPT.
group 1 action
A8.0
Receives verbs SCRIPT [ON] TRANSCRIPT [ON].
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
group 2 action
9.0
A8.0
Receives verbs L[OOK] IN|INSIDE|INTO|THROUGH SEARCH.
variable
9.0
Contains the object (or occasionally number) which is the secondary focus of the current action.
variable
3.9
Contains the object which received a message.
special object
A7.0
The default player object. Programs should refer not to this object directly, but instead to the player variable, whose content is usually self_obj, but may be another object.
variable
3.9
Contains the object which sent a message (or nothing if the message wasnt from an object).
directive
2.5
Specifies the programs serial number, as a string of six digits. The default value is the compilation date in the form yymmdd.
Serial "dddddd";
group 3 action
9.0
A8.0
Receives verbs ADJUST SET.
routine
29.0
Defines the object to which a pronoun like IT or HIM refers. See also MANUAL_PRONOUNS PronounNotice PronounValue.
SetPronoun('pronoun', object)
routine
18.0
A7.0
Sets the games 24-hour clock the_time to time (in seconds 0..1439 since midnight), running at rate (zero means time stands still, positive means rate seconds pass each turn, negative means each second encompasses -rate turns).
group 3 action
9.0
A8.0
Receives verbs ADJUST TO SET TO.
property
22.0
A6.0
For an object: an alternative or extended short name.
The value of the property can be:
short_name "string" short_name [; statement; statement; ...; ]
obscure property
A6.0
group 2 action
9.0
16.0
A8.0
Receives verbs DISPLAY [TO] PRESENT [TO] SHOW [TO].
group 1 debug action
30.0
Receives verb SHOWOBJ. Displays the status of the current room, or of a specified object.
>SHOWOBJ >SHOWOBJ object
group 1 debug action
30.0
Receives verb SHOWVERB. Displays the grammar of the specified verb.
>SHOWVERB verb
routine
3.2
Returns the object which is the next sibling of its object argument; returns nothing if the argument has no sibling. See also child children parent.
sibling(argument)
group 3 action
9.0
A8.0
Receives verb SING.
group 3 action
9.0
A8.0
Receives verbs NAP SLEEP.
group 3 action
9.0
A8.0
Receives verbs SMELL SNIFF.
group 3 action
9.0
A8.0
Receives verb SORRY.
statement
1.14
Outputs multiple spaces.
spaces number;
group 3 action
9.0
A8.0
Receives verbs SQUASH SQUEEZE.
routine
18.0
A7.0
Starts the objects daemon.
StartDaemon(object)
routine
18.0
A7.0
Starts the objects timer, initialising its time_left to number. The objects time_out routine will be called after the specified number of turns have elapsed.
StartTimer(object, number)
THREAD
A2.0
An instruction defining run-time behaviour.
attribute
A5.0
For an object: is incapable of being taken.
directive
18.0
32.0
Selects one of two basic status line formats. The default is score.
Statusline score; Statusline time;
routine
18.0
A7.0
Stops the objects daemon.
StopDaemon(object)
routine
18.0
A7.0
Stops the objects timer.
StopTimer(object)
mandatory constant
20.0
A10.0
The name of the story, by convention given in uppercase.
Constant Story "string";
statement
32.0
Declares a string pseudo-variable.
string number "string";
The number is in the range 0..31. The pseudo-variable value can be included in an output string using a three-character identity @00..@31. See also Lowstring.
An anonymous text string, declared using "...". One of Informs four metaclass types - see also class object routine.
group 3 action
9.0
A8.0
Receives strong swearwords.
obscure directive
4.2
Declares a routine unless it already exists.
Stub identifier constant;
statement
1.14
Switches between output font styles.
style bold; ! Use emboldening style fixed; ! Use fixed pitch style reverse; ! Use inverse-video style roman; ! Use standard style style underline; ! Use underlining
attribute
A5.0
For an object: other objects can be placed on it.
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
group 3 action
9.0
A8.0
Receives verbs DIVE SWIM.
group 3 action
9.0
A8.0
Receives verbs SWING [ON].
statement
1.10
Executes the statements associated with constant values(s). Each statement is automatically a code block, so does not need to be enclosed in {...}. See also break.
switch (expression) {
constant: statement; ...;
constant: statement; ...;
...
default: statement; ...;
}
Each constant can be a single number, a range of consecutive numbers given as lo_number to hi_number, or any combination of the two in a comma-separated list.
switch (my_day_num) {
1: print "Monday";
2: print "Tuesday";
3: print "Wednesday";
4: print "Thursday";
5: print "Friday";
6,7: print "the weekend";
default: print "what calendar are you using?";
}
attribute
13.0
A5.0
For an object: is capable of being switched off or on.
directive
5.0
Controls how the program is compiled and executed. Any combination of:
Switches switch switch ...;
group 2 action
9.0
A8.0
Receives verbs CLOSE OFF SCREW OFF SWITCH OFF TURN OFF TWIST OFF.
group 2 action
9.0
A8.0
Receives verbs SCREW ON SWITCH ON TURN ON TWIST ON..
obscure directive
4.2
21.0
group 2 action
9.0
A8.0
Receives verbs CARRY GET HOLD PEEL [OFF] PICK UP REMOVE TAKE.
attribute
A5.0
For an object: is capable of being addressed in object, do this style.
A number identifying a task whose achievement is scored. See also Achieved NUMBER_TASKS PrintTaskName task_scores TASKS_PROVIDED.
variable
20.0
A byte array containing the individual scores for the task scoring system. See also Achieved NUMBER_TASKS PrintTaskName TASKS_PROVIDED.
Array task_scores -> number number ...;
constant
20.0
A10.0
Must be defined to activate the task scoring system; its value is immaterial. See also Achieved NUMBER_TASKS PrintTaskName task_scores.
Constant TASKS_PROVIDED;
group 3 action
9.0
A8.0
Receives verb TASTE.
group 3 action
9.0
16.0
A8.0
Receives verb TELL ABOUT.
routine
28.0
A7.0
Returns true if the object is in scope, otherwise false. If the optional actor is supplied, the scope is calculated for that actor rather than for the player.
TestScope(object, actor)
variable
18.0
Contains the games clock, in seconds 0..1439 since midnight.
special object
17.0
19.0
A7.0
A pseudo-room which becomes the location when there is no light (although the player object is not moved there), and whose description is then output.
fake_action
25.0
Generated when the parser cant distinguish between two objects.
group 3 action
9.0
A8.0
Receives verb THINK.
group 3 action
9.0
16.0
A8.0
Receives verbs THROW AGAINST|AT|ON|ONTO.
fake_action
9.0
Generated by ThrowAt, for possible use by the target of the throw.
group 3 action
9.0
A8.0
Receives verbs ATTACH [TO] FASTEN [TO] FIX [TO] TIE [TO].
See Statusline.
property
18.0
A6.0
For a timer object: a variable to hold the number of turns left until this objects timer (activated and initialised by StartTimer) counts down to zero and invokes the objects time_out property.
time_left 0
property
18.0
A6.0
For a timer object: an embedded routine which is run when the objects time_left value (initialised by StartTimer, and not in the meantime cancelled by StopTimer) counts down to zero.
time_left [; statement; statement; ...; ]
deprecated entry_point
A10.0
If defined, called after every turn.
[ TimePasses; statement; statement; ...; ];
group 1 debug action
30.0
Receives verbs DAEMONS OFF TIMERS OFF. Disables display of daemon/timer status.
>DAEMONS OFF >TIMERS OFF
group 1 debug action
30.0
Receives verbs DAEMONS [ON] TIMERS [ON]. Enables display of daemon/timer status.
>DAEMONS >DAEMONS ON >TIMERS >TIMERS ON
group 3 action
9.0
A8.0
Receives verbs FEEL FONDLE GROPE TOUCH.
directive
Controls run-time tracing. section is one of assembly expressions lines objects symbols verbs, or can be omitted. level is one of off on or a number, or can be omitted.
Trace section level;
group 1 debug action
30.0
Receives verb TRACE number. Enables tracing at level 1-5.
>TRACE number
group 1 debug action
30.0
Receives verb TRACE OFF. Disables tracing.
>TRACE OFF
group 1 debug action
30.0
Receives verbs TRACE [ON]. Enables tracing at level 1.
>TRACE >TRACE ON
group 2 action
9.0
A8.0
Receives verbs CLEAR TO MOVE TO PRESS TO PUSH TO SHIFT TO TRANSFER TO.
attribute
A5.0
For a container object: objects inside it are visible.
constant
1.4
Logical TRUE (decimal 1). In fact, any non-zero value is treated as true in a boolean_expression.
routine
24.0
A7.0
Tries to parse the word at word_number of the input stream as a number, recognising decimal numbers, also English numbers one..twenty. Values exceeding 10000 are rounded down to 10000. Returns the number, or -1000 if the parse fails.
TryNumber(word_number)
group 3 action
9.0
A8.0
Receives verbs ROTATE SCREW TURN TWIST UNSCREW.
variable
Contains the games turn counter.
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
See style.
entry_point
26.0
A10.0
If defined, called when an unusual verb is encountered.
[ UnknownVerb; statement; statement; ...; ];
group 2 action
9.0
A8.0
Receives verbs OPEN WITH UNDO WITH UNLOCK WITH.
routine
A7.0
Returns -1 if number1 is less than number2, 0 if number1 equals number2, and 1 if number1 is greater than number2. Both numbers are unsigned, in the range 0..65535.
UnsignedCompare(number1, number2)
See do.
constant
4.3
Must be defined to link with pre-compiled (rather then source) library modules; its value is immaterial.
Constant USE_MODULES;
group 2 action
9.0
A8.0
Receives verbs GO LEAVE RUN WALK.
THREAD
1.4
The identifier of a storage location capable of holding a sixteen-bit value, which can be anything specified for a constant. Note that a variable is not typed, so that it is the programmers responsibility to keep track of its contents and not perform meaningless operations on it (for example, incrementing a string is A Bad Idea).
Variables must be declared before being referenced, using one of:
A newly-created variable initially contains zero unless set to some other value at compile-time by the declaration. Once declared, a variables value can be altered by a run-time assignment. See also Array.
directive
26.0
27.0
Adds to the games repertoire of verbs. See also Extend. The first form simply provides one or more synonyms for any existing dictionary verb. Any action(s) which result from the known_verb will now also result from the new verbs:
Verb "verb" "verb" ... = "known_verb";
The second form provides new grammar. The word meta is optional and generally omitted; it defines a group 1 action which controls (rather than being a part of) the game The word reverse is optional and generally omitted; it indicates that the two arguments must be interchanged before being offered to the action:
Verb meta "verb" "verb" ...
* token token ... -> action reverse
* token token ... -> action reverse
...;
The tokens are any combination, including none, of:
The first word in a command typed by the player, which is then mapped to an action.
7.0
20.0
21.0
Library file containing Informs English verb actions. See program
Include Verblib;
group 1 action
A8.0
Receives verb VERIFY.
group 1 action
A8.0
Receives verb VERSION.
obsolete directive
attribute
19.0
22.0
A5.0
special object
A7.0
See compass.
property
A6.0
For a room: a possible exit from the room. The value of the property can be:
group 3 action
9.0
A8.0
Receives verbs WAIT Z.
group 3 action
9.0
A8.0
Receives verbs AWAKE[N] WAKE [UP].
group 3 action
9.0
16.0
A8.0
Receives verbs AWAKE[N] WAKE [UP].
group 3 action
9.0
A8.0
Receives verb WAVE.
group 3 action
9.0
A8.0
Receives verb WAVE.
group 2 action
9.0
A8.0
Receives verbs DON PUT ON WEAR.
property
A6.0
For a container or door object: used when including this object in a rooms long description. The value of the property can be:
when_closed "string" when_closed [; statement; statement; ...; ]
property
13.0
A6.0
For a switchable object: used when including this object in a rooms long description. The value of the property can be:
when_off "string" when_off [; statement; statement; ...; ]
property
13.0
A6.0
For a switchable object: used when including this object in a rooms long description. The value of the property can be:
when_on "string" when_on [; statement; statement; ...; ]
property
A6.0
For a container or door object: used when including this object in a rooms long description. The value of the property can be:
when_open "string" when_open [; statement; statement; ...; ]
statement
1.11
Executes a statement for as long as the boolean_expression is true. The statement can be a code block enclosed in {...}. If the condition is initially false, the statement is never executed. See also break continue.
while (boolean_expression) statement;
3.5
Associates one or more public property variables with the object at compile-time. See Class Object.
with property value, property value, ...
The value is normally a single constant, or can be omitted (in which case the property is created with a value of zero). If two or more consecutive values are provided, the property becomes an array - see Array. Finally, the value can be an embedded routine which returns a value or performs an action:
with property [; statement; statement; ... ], ...
property
A6.0
For a lockable object: the key needed to lock and unlock the object, or nothing if no key fits.
with_key object
constant
10.0
A10.0
Must be defined to de-activate the standard compass directions (all bar IN and OUT); its value is immaterial. Alternative directions should be defined and placed in the compass.
Constant WITHOUT_DIRECTIONS;
variable
24.0
Contains the input stream word number, counting from 1.
2.5
3.5
An entry in the Inform dictionary, created by '...' or name, which is recognised by the parser when translating the players typed commands into an action. Only the first nine characters are significant.
routine
24.0
A7.0
Returns a byte array contains the raw text of word_number in the input stream.
WordAddress(word_number)
routine
24.0
A7.0
Returns the length of the raw text of word_number in the input stream.
WordLength(word_number)
obscure attribute
23.0
A5.0
attribute
A5.0
For a clothing object: is being worn.
routine
23.0
A7.0
Outputs a list of object and its siblings, in the given style, a bitmap formed by adding any of:
WriteListFrom(object, style)
group 1 debug action
30.0
Receives verb ABSTRACT TO. Moves an object.
>ABSTRACT object TO parent_object
group 1 debug action
30.0
Receives verb PURLOIN. Moves an object to the player.
>PURLOIN object
group 1 debug action
30.0
Receives verb TREE. Displays the complete object tree, or that below the specified object.
>TREE >TREE object
group 3 action
9.0
A8.0
Receives verb Y[ES].
routine
32.0
A7.0
Returns true if the player types YES, false if she types NO.
YesOrNo()
routine
A7.0
Returns the type of its argument: 3 for a string address, 2 for a routine address, 1 for an object number, or 0 otherwise.
ZRegion(argument)