Message fatalerror "*** Library 6/9 needs Inform v6.10 or later to work ***";
ENDIF;
Include "linklpa";
Fake_Action LetGo;
Fake_Action Receive;
Fake_Action ThrownAt;
Fake_Action Order;
Fake_Action TheSame;
Fake_Action PluralFound;
Fake_Action ListMiscellany;
Fake_Action Miscellany;
Fake_Action Prompt;
Fake_Action NotUnderstood;
IFDEF NO_PLACES;
Fake_Action Places;
Fake_Action Objects;
ENDIF;
[ Main; InformLibrary.play(); ];
IFDEF USE_MODULES;
Link "parserm";
IFNOT;
Include "parserm";
ENDIF;
Times New Roman
&Heading 1L
Times New Roman
&Heading 2L
Times New Roman
&Heading 3L
OutputO
Courier New
SBecause of the way the Epoc console is implemented, and the way output is currently handled by this port, it is tricky to read the help text produced by inform. Here it is:
Epoc Inform 6.21 (30th April 1999)
his program is a compiler of Infocom format (also called "Z-machine")
story files: copyright (c) Graham Nelson 1993, 1994, 1995, 1996, 1997, 1998.
Usage: "inform [commands...] <file1> [<file2>]"
<file1> is the Inform source file of the game to be compiled. <file2>,
if given, overrides the filename Inform would normally use for the
compiled output. Try "inform -h1" for file-naming conventions.
One or more words can be supplied as "commands". These may be:
-switches a list of compiler switches, 1 or 2 letter
(see "inform -h2" for the full range)
+dir set Include_Path to this directory
+PATH=dir change the PATH to this directory
$... one of the following memory commands:
$list list current memory allocation settings
$huge make standard "huge game" settings (default)
$large make standard "large game" settings
$small make standard "small game" settings
$?SETTING explain briefly what SETTING is for
$SETTING=number change SETTING to given number
(filename) read in a list of commands (in the format above)
from this "setup file"
For example: "inform -dexs $huge curses".
For fuller information, see the Inform Designer's Manual.
[No compilation requested]
Here is the output of running "inform -h2":
Epoc Inform 6.21 (30th April 1999)
This program is a compiler of Infocom format (also called "Z-machine")
story files: copyright (c) Graham Nelson 1993, 1994, 1995, 1996, 1997, 1998.
Help on the full list of legal switch commands:
a trace assembly-language (without hex dumps; see -t)
c more concise error messages
d contract double spaces after full stops in text
d2 contract double spaces after exclamation and question marks, too
e economy mode (slower): make use of declared abbreviations
f frequencies mode: show how useful abbreviations are
g traces calls to functions (except in the library)
g2 traces calls to all functions
h print this information
i ignore default switches set within the file
j list objects as constructed
k output Infix debugging information to "gameinfo.dbg" (and switch -D on)
l list every statement run through Inform
m say how much memory has been allocated
n print numbers of properties, attributes and actions
o print offset addresses
p give percentage breakdown of story file
q keep quiet about obsolete usages
r record all the text to "gametext.txt"
s give statistics
t trace assembly-language (with full hex dumps; see -a)
u work out most useful abbreviations (very very slowly)
v3 compile to version-3 ("Standard") story file
v4 compile to version-4 ("Plus") story file
v5 compile to version-5 ("Advanced") story file: the default
v6 compile to version-6 (graphical) story file
v8 compile to version-8 (expanded "Advanced") story file
w disable warning messages
x print # for every 100 lines compiled
y trace linking system
z print memory map of the Z-machine
C0 text character set is plain ASCII only
Cn text character set is ISO 8859-n (n = 1 to 9)
(1 to 4, Latin1 to Latin4; 5, Cyrillic; 6, Arabic;
F1 use temporary files to reduce memory consumption
L log all console messages to message log file messages.txt
M compile as a Module for future linking
S compile strict error-checking at run-time (on by default)
U insert "Constant USE_MODULES;" automatically
X compile with INFIX debugging facilities present
[No compilation requested]
And finally, for the completists in the audience, here is the result of running "inform $list"
Epoc Inform 6.21 (30th April 1999)
+--------------------------------------+
| Memory setting = Value |
+--------------------------------------+
| MAX_ABBREVS = 64 |
| MAX_ACTIONS = 200 |
| MAX_ADJECTIVES = 50 |
| MAX_CLASSES = 64 |
| MAX_CLASS_TABLE_SIZE = 1000 |
| MAX_DICT_ENTRIES = 2000 |
| MAX_EXPRESSION_NODES = 100 |
| HASH_TAB_SIZE = 512 |
| MAX_INDIV_PROP_TABLE_SIZE = 15000 |
| MAX_LABELS = 1000 |
| MAX_LINESPACE = 16000 |
| MAX_LINK_DATA_SIZE = 2000 |
| MAX_LOW_STRINGS = 2048 |
| MAX_OBJECTS = 640 |
| MAX_PROP_TABLE_SIZE = 30000 |
| MAX_QTEXT_SIZE = 4000 |
| MAX_SYMBOLS = 10000 |
| MAX_STATIC_DATA = 10000 |
| MAX_STATIC_STRINGS = 8000 |
| SYMBOLS_CHUNK_SIZE = 5000 |
| MAX_TRANSCRIPT_SIZE = 200000 |
| MAX_VERBS = 200 |
| MAX_VERBSPACE = 4096 |
| MAX_ZCODE_SIZE = 20000 |
+--------------------------------------+
[No compilation requested]
"Word.app
Times New Roman
&Heading 1L
Times New Roman
&Heading 2L
Times New Roman
&Heading 3L
CodeO
Courier New
BNotes on this port of Inform
Storage Requirements:
The inform library and compiler will require just under 700K. In addition, the compiler itself will require about 1M of storage on drive C while it is running. You will also need storage for your inform source files and the Z-code output, of course.
The command line
The only way to pass command line arguments to an EXE under Epoc is to use the command line shell "eshell". Unfortunately the Epoc shell appears to map the entire command line up uppercase. This makes it difficult to pass some parameters to inform (such as -x). While you could put the switches in your inform source a better solution is to place create an icl commands file and run inform with the name of this file:
inform (c:\inf\cmds.icl)
You will have to provide the full path to the icl file. You must also provide full paths for any other filenames you use. If inform fails to locate any files, or if any of your output files appear to be missing check that you have used fully qualified path names. Missing output files might be lurking in \System\Programs on the drive you installed inform to. This is caused by the command line shell not setting the working directory for inform.
New options to Inform
This port adds one new switch and one new path to Inform. The console used in this port does not provide any mechanism for capturing what is printed. This means that if there is more than a single screenful of messages printed during a run of inform there is no way to examine the old text. In an attempt to fix this two new elements have been added to ICL which allow everything printed to the console to be logged:
The switch -L causes all text written to the console to be logged in a text file. The default name for this file is "messages.txt"
The path "Messages_Name" can be set to a filename to be used as the log.
So, to place the inform help messages in the file "C:\Documents\Inform.txt" use the command line
Most of the package is installed to the \Inform directory on the chosen drive. The main inform binary, however, is installed to \System\Programs on the same drive. Installing to \System\Programs allows eshell to locate the inform executable without having to provide a complete path. Your own sources can go anywhere, of course.
Invoking Eshell
Eshell is Symbians command line environment for Epoc. It is not a standard feature of Epoc, but it is useful for running ports which have not been given a native GUI (like Inform). You will have to obtain a copy (for instance, from the symbian website at http://www.symbian.com). You can start it from system once you have installed it. If you would rather have an icon on the extras bar for it, then you could make a small OPL program to start it up - this minimal OPL program will do it:
INCLUDE "System.oxh"
APP EShell, &20000000
PROC Main:
RunExe:("c:\inform\eshell.exe")
Enter this into program and compile it and an icon for eshell will be added to the extras bar. A couple of points to note about this program:
It uses a development UID (&20000000). UIDs in the range 0x01000000 to 0x0fffffff are reserved for development work and should not be used for software being distributed - Symbian allocate UIDs for all applications.
The path to eshell depends on where you installed it, obviously.
This application uses the default "question mark" icon. Consult the OPL programming manual if you want to add a fancy icon.
Known issues
The user interface could be a more Eikon-ish (it could hardly be less eikon-ish).
Release History
1999/07/08: Version 1.00: Initial release (labelled Alpha)
1999/08/10: Version 1.01:
Reapplied the veneer.c patch properly (d'oh) and rewrote the readme in line with comments received.
1999/09/14:
Version 1.02: Added a new switch and a new path to inform to enable logging of everything output to the console.
End notes and copyrights
Inform and the Inform Library was written by, and is the copyright of, Graham Nelson.
1994-1999.
The original is available from http://www.gnelson.demon.co.uk/.
This version of Inform 6.21 was compiled by Glenn Strong <Glenn.Strong@cs.tcd.ie> and is available from http://www.cs.tcd.ie/Glenn.Strong/epoc/
Courier New
Swiss
"Word.app
A 'string' array can have at most 256 entries
MAX_STATIC_DATA
Entries in byte arrays and strings must be known constants
Entry in '->' or 'string' array not in range 0 to 255
new array name
new global variable name
Variable must be defined before use:
MAX_ARRAYS
All 233 global variables already declared
array definition
more modern to use 'Array', not 'Global'
'->', '-->', 'string' or 'table'
'=', '->', '-->', 'string' or 'table'
No array size or initial values given
use '->' instead of 'data'
use '->' instead of 'initial'
use '->' instead of 'initstr'
Array sizes must be known now, not externally defined
An array must have between 1 and 32767 entries
Missing ';' to end the initial array values before "[" or "]"
literal text in double-quotes
error
static data
array sizes
array types
array symbols
global values
MAX_LABELS
TEMP1
TEMP2
TEMP3
TEMP4
sender
sw__var
expr_
long_
short_
<no value>
MAX_ZCODE_SIZE
picture_table
make_menu
print_form
put_wind_prop
push_stack
mouse_window
read_mouse
pop_stack
scroll_window
get_wind_prop
window_style
window_size
move_window
set_margins
erase_picture
picture_data
draw_picture
restore_undo
save_undo
set_font
art_shift
log_shift
piracy
catch
call_1n
check_arg_count
print_table
copy_table
encode_text
tokenise
call_vn2
call_vn
throw
set_colour
call_2n
call_1s
scan_table
read_char
buffer_mode
set_text_style
get_cursor
set_cursor
erase_line
erase_window
call_vs2
call_vs
call_2s
verify
show_status
new_line
ret_popped
restart
restore
print_ret
print
rfalse
rtrue
print_paddr
print_obj
remove_obj
print_addr
get_prop_len
get_parent
get_child
get_sibling
sound_effect
input_stream
output_stream
set_window
split_window
random
print_num
print_char
put_prop
storeb
storew
get_next_prop
get_prop_addr
get_prop
loadb
loadw
insert_obj
store
clear_attr
set_attr
test_attr
inc_chk
dec_chk
invalid
<operand>
<operand1> <operand2>
<0 to 4 operands>
<0 to 8 operands>
<text>
<label>
<variable>
<routine>
<1 to 4 operands>
<1 to 8 operands>
-> <result-variable>
?[~]<label>
Opcode unavailable in this Z-machine version
This statement can never be reached
%5d +%05lx %3s %-12s
FALSE
rtrue if %s
rfalse if %s
(no branch)
to L%d if %s
%02x
Assembly mistake: syntax is
%5d +%05lx .L%d
%5d +%05lx [ %s
[ %s(
%s%s =
Local variable
Routine contains no such label as
Label
Backpatching routine at %05lx: initial size %d, %d labels
Branch detected at offset %04x
To label %d, which is %d from here
Short form
Opening label: %d
Label %d offset %04x next -> %d previous -> %d
Position of L%d corrected from %04x to %04x
Label out of range for branch
Addr is %04x
Illegal code backpatch value
Illegal value of %02x at PC = %04x
After branch optimisation, routine length is %d bytes
expression
variable or constant
Opcode specification should have form "VAR:102"
VAR_LONG
EXT_LONG
Expected 0OP, 1OP, 2OP, VAR, EXT, VAR_LONG or EXT_LONG
%d to %d
For this operand type, opcode number must be in range
Unknown flag: options are B (branch), S (store), T (text), I (indirect addressing), F** (set this Flags 2 bit)
an opcode name
literal text in double-quotes
semicolon ';' after print string
Only one '->' store destination can be given
variable name or 'sp'
Store '->' destination not 'sp' or a variable:
Only one '?' branch destination can be given
label name after '?' or '?~'
No assembly instruction may have more than 8 operands
This opcode does not use indirect addressing
Indirect addressing can only be used on the first operand
Opcode unavailable in this Z-machine version:
Store destination (the last operand) is not a variable
Character must first be entered into Zcharacter table:
Character can't be used in alphabets unless entered into Zcharacter table
Alphabet string must give exactly 23 characters
Alphabet string must give exactly 26 characters
Character duplicated in alphabet:
Attempted to map a Unicode character into the ZSCII set at an illegal position
No more room in the Zcharacter table
'@' plus an accent code or '@{...}'
No such accented character as
'@{' without matching '}'
At most four hexadecimal digits allowed in '@{...}'
'@{...}' may only contain hexadecimal digits
@{%x}
Latin1
Latin2
Latin3
Latin4
Cyrillic
Arabic
Greek
Hebrew
Latin5
Plain ASCII
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
^0123456789.,!?_#'~/\-:()
All 64 abbreviations already declared
MAX_ABBREVS
All abbreviations must be declared together
abbreviation string
It's not worth abbreviating
new constant name
Grammar__Version must be given an explicit constant value
Once a fake action has been defined it is too late to change the grammar version. (If you are using the library, move any Fake_Action directives to a point after the inclusion of "Parser".)
'Default' cannot be used in -M (Module) mode
use 'word' as a constant dictionary address
'Endif' without matching 'If...'
symbol name
'Ifnot' without matching 'If...'
Second 'Ifnot' for the same 'If...' condition
End of file reached in code 'If...'d out
This condition can't be determined
semicolon after 'If...' condition
'Import' can only be used in -M (Module) mode
'Import' cannot import things of this type:
filename in double-quotes
semicolon ';' after Include filename
language__
'LowString' cannot be used in -M (Module) mode
new low string name
literal string in double-quotes
error message in double-quotes
fatal error message in double-quotes
warning message in double-quotes
a message in double-quotes, 'error', 'fatalerror' or 'warning'
A definite value must be given as release number
You can't 'Replace' a system function already used
name of routine to replace
name of routine not yet defined
The serial number must be a 6-digit date in double-quotes
This does not set the final game's statusline
'score' or 'time' after 'statusline'
routine name to stub
number of local variables
Must specify 0 to 3 local variables for 'Stub' routine
dummy1
dummy2
dummy3
string of switches
A 'Switches' directive must must come before the first constant definition
debugging keyword
A definite value must be given as version number
The version number must be in the range 3 to 8
double-quoted alphabet string
single character value
character or Unicode number
ZSCII number
'table', 'terminating', a string or a constant
three alphabet strings, a 'table' or 'terminating' command or a single character
"%s",
line %d:
(%d):
File "%s"; Line %d #
Fatal error: %s
%s "%s"
Run out of memory allocating %d bytes for %s
Run out of memory allocating array of %dx%d bytes for %s
The memory setting %s (which is %ld at present) has been exceeded. Try running Inform again with $%s=<some-larger-number> on the command line.
I/O failure: couldn't backtrack on story file for checksum
Couldn't open message log file
Couldn't open transcript file
Transcript of the text of "%s"
[From %s]
[End of transcript: release %d.%s]
I/O failure: couldn't write to transcript file
Couldn't open debugging information file
I/O failure: can't write to debugging info file
Couldn't open temporary file 1
Couldn't open temporary file 2
Couldn't open temporary file 3
I/O failure: couldn't write to temporary file 1
I/O failure: couldn't write to temporary file 2
I/O failure: couldn't write to temporary file 3
filename storage
Class
Object
Routine
String
The character '%c' is used to divide entries in a list of possible locations, and can only be used in the Include_Path, Source_Path, Module_Path or ICL_Path variables. Other paths are for output only.
\system\temp
gameinfo.dbg
gametext.txt
English
messages.txt
source_path
include_path
code_path
module_path
icl_path
temporary_path
debugging_name
transcript_name
language_name
message_name
No such path setting as "%s"
(unset)
Help information on filenames:
The command line can take one of two forms:
inform [commands...] <file1>
inform [commands...] <file1> <file2>
Inform translates <file1> into a source file name (see below) for its input.
<file2> is usually omitted: if so, the output filename is made from <file1>
by cutting out the name part and translating that (see below).
If <file2> is given, however, the output filename is set to just <file2>
(not altered in any way).
Filenames given in the game source (with commands like Include "name" and
Link "name") are also translated by the rules below.
Rules of translation:
Inform translates plain filenames (such as "xyzzy") into full pathnames
(such as "adventure%cgames%cxyzzy") according to the following rules.
1. If the name contains a '%c' character (so it's already a pathname), it
isn't changed.
[Exception: when the name is given in an Include command using the >
form (such as Include ">prologue"), the ">" is replaced by the path
of the file doing the inclusion
and a suitable file extension is added
Filenames must never contain double-quotation marks ". To use filenames
which contain spaces, write them in double-quotes: for instance,
"inform +code_path="Jigsaw Final Version" jigsaw".
2. The file is looked for at a particular "path" (the filename of a
directory), depending on what kind of file it is.
File type Name Current setting
Source code (in) source_path %s
Include file (in) include_path %s
Story file (out) code_path %s
Temporary file (out) temporary_path %s
ICL command file (in) icl_path %s
Module (in & out) module_path %s
If the path is unset, then the current working directory is used (so
the filename doesn't change): if, for instance, include_path is set to
"backup%coldlib" then when "parser" is included it is looked for at
"backup%coldlib%cparser".
The paths can be set or unset on the Inform command line by, eg,
ensures that MAX_STATIC_STRINGS is at least twice the size of this.
MAX_SYMBOLS is the maximum number of symbols - names of variables,
objects, routines, the many internal Inform-generated names and so on.
The symbols names are stored in memory which is allocated in chunks
of size SYMBOLS_CHUNK_SIZE.
HASH_TAB_SIZE is the size of the hash tables used for the heaviest
symbols banks.
MAX_OBJECTS is the maximum number of objects. (If compiling a version-3
game, 255 is an absolute maximum in any event.)
MAX_ACTIONS is the maximum number of actions - that is, routines such as
TakeSub which are referenced in the grammar table.
MAX_ADJECTIVES is the maximum number of different "adjectives" in the
grammar table. Adjectives are misleadingly named: they are words such as
"in", "under" and the like.
MAX_DICT_ENTRIES is the maximum number of words which can be entered
into the game's dictionary. It costs 29 bytes to increase this by one.
MAX_STATIC_DATA is the size of an array of integers holding initial
values for arrays and strings stored as ASCII inside the Z-machine. It
should be at least 1024 but seldom needs much more.
MAX_PROP_TABLE_SIZE is the number of bytes allocated to hold the
properties table.
MAX_ABBREVS is the maximum number of declared abbreviations. It is not
allowed to exceed 64.
MAX_ARRAYS
MAX_ARRAYS is the maximum number of declared arrays.
MAX_EXPRESSION_NODES is the maximum number of nodes in the expression
evaluator's storage for parse trees. In effect, it measures how
complicated algebraic expressions are allowed to be. Increasing it by
one costs about 80 bytes.
MAX_VERBS is the maximum number of verbs (such as "take") which can be
defined, each with its own grammar. To increase it by one costs about
128 bytes. A full game will contain at least 100.
MAX_VERBSPACE is the size of workspace used to store verb words, so may
need increasing in games with many synonyms: unlikely to exceed 4K.
MAX_LABELS is the maximum number of label points in any one routine.
(If the -k debugging information switch is set, MAX_LABELS is raised to
a minimum level of 2000, as about twice the normal number of label points
are needed to generate tables of how source code corresponds to positions
in compiled code.)
MAX_LINESPACE is the size of workspace used to store grammar lines, so
may need increasing in games with complex or extensive grammars.
MAX_STATIC_STRINGS is the size in bytes of a buffer to hold compiled
strings before they're written into longer-term storage. 2000 bytes is
plenty, allowing string constants of up to about 3000 characters long.
Inform automatically ensures that this is at least twice the size of
MAX_QTEXT_SIZE, to be on the safe side.
MAX_ZCODE_SIZE is the size in bytes of a buffer to hold compiled
Z-machine code for a single routine. As a guide, the longest library
routine is about 6500 bytes long.
MAX_LINK_DATA_SIZE is the size in bytes of a buffer to hold module
link data before it's written into longer-term storage. 2000 bytes
is plenty.
MAX_LOW_STRINGS is the size in bytes of a buffer to hold all the
compiled "low strings" which are to be written above the synonyms table
in the Z-machine. 1024 is plenty.
MAX_TRANSCRIPT_SIZE is only allocated for the abbreviations optimisation
switch, and has the size in bytes of a buffer to hold the entire text of
the game being compiled: it has to be enormous, say 100000 to 200000.
MAX_CLASSES maximum number of object classes which can be defined. This
is cheap to increase.
MAX_CLASS_TABLE_SIZE is the number of bytes allocated to hold the table
of properties to inherit from each class.
MAX_INDIV_PROP_TABLE_SIZE is the number of bytes allocated to hold the
table of ..variable values.
No such memory setting as "%s"
LARGE
SMALL
Bad numerical setting in $ command "%s=%s"
BUFFER_LENGTH
MAX_BANK_SIZE
BANK_CHUNK_SIZE
MAX_OLDEPTH
MAX_ROUTINES
MAX_GCONSTANTS
MAX_FORWARD_REFS
STACK_SIZE
STACK_LONG_SLOTS
STACK_SHORT_LENGTH
The Inform 5 memory setting "%s" has been withdrawn.
It should be safe to omit it (putting nothing in its place).
No such memory $ command as "%s"
Properties table used %d
Allocated a total of %ld bytes of memory
%s %02ld
All 32 attributes already declared (compile as Advanced game to get an extra 16)
All 48 attributes already declared
new attribute name
an existing attribute name after 'alias'
All 30 properties already declared (compile as Advanced game to get an extra 62)
All 62 properties already declared
all properties are now automatically 'long'
new property name
'alias' incompatible with 'additive'
an existing property name after 'alias'
obj par nxt chl Object tree:
%3d %3d %3d %3d
An additive property has inherited so many values that the list has overflowed the maximum 32 entries
MAX_INDIV_PROP_TABLE_SIZE
MAX_PROP_TABLE_SIZE
property name
"%s" is a name already in use (with type %s) and may not be used as a property name too
No such property name as
Property should be declared in 'with', not 'private':
Property given twice in the same declaration:
Property given twice in the same declaration, because the names '%s' and '%s' actually refer to the same property
%s::%s
%s.%s
Missing ','? Property data seems to contain the property name
Limit (of 32 values) exceeded for property
Version 3 limit of 4 values per property exceeded (use -v5 to get 32), so truncating property
attribute name after '~'
name of an already-declared attribute
name of an already-declared class
Two commas ',' in a row in object/class definition
Object/class definition finishes with ','
Expected 'with', 'has' or 'class' in object/class definition but found
MAX_CLASSES
Inform's maximum possible number of classes (whatever amount of memory is allocated) has been reached. If this causes serious inconvenience, please contact the author.
new class name
Duplicate-number not known at compile time
The number of duplicates must be 0 to 10000
This class is too complex: it now carries too many properties. You may be able to get round this by declaring some of its property names as "common properties" using the 'Property' directive.
MAX_OBJECTS
nameless_obj__%d
The syntax '->' is only used as an alternative to 'Nearby'
name for new object or its textual short name
Two textual short names given for only one object
parent object or the object's textual short name
parent object
body of object definition
name of (the parent) object
(with no short name)
%3d "%s"
Use of '->' (or 'Nearby') clashes with giving a parent
'->' (or 'Nearby') fails because there is no previous object
'-> -> ...' fails because no previous object is deep enough
objects
inherited classes list
pointers to classes
class object numbers
properties table
individual properties table
property 3 lists
Unlike C, Inform uses ':' to divide parts of a 'for' loop specification: replacing ';' with ':'
label name
A reserved word was used as a print specification:
printing routine name
print specification
comma
something to print
Duplicate definition of label:
statement
The 'box' statement has no effect in a version 3 game
text of box line in double-quotes
No lines of text given for 'box' display
'break' can only be used in a loop or 'switch' block
'continue' can only be used in a loop block
'do' without matching 'until'
'on' or 'off'
This is not a declared Attribute:
'objectloop' variable
In Version 3 no status-line drawing routine can be given
The 'style' statement cannot be used for Version 3 games
'roman', 'bold', 'underline', 'reverse' or 'fixed'
'default' without matching 'switch'
'else' without matching 'if'
'until' without matching 'do'
MAX_SYMBOLS
symbol names chunk
Routine
Label
Global variable
Array
Defined constant
Attribute
Property
Individual property
Object
Class
Fake action
(Unknown type)
(used)
(Replaced)
(Defaulted)
(Stubbed)
(value will change)
(Imported)
(Exported)
(System)
(created in sys file)
('Unknown' error issued)
(aliased)
(Action name)
(Redefinable)
%4d %-16s %2d:%04d %04x %s
<unknown attribute>
nothing
false
Grammar__Version
MODULE_MODE
STRICT_MODE
DEBUG
USE_MODULES
INFIX
infix__watching
temp_global
temp__global2
temp__global3
temp__global4
sender
sw__var
sys__glob0
sys__glob1
sys__glob2
create
recreate
destroy
remaining
print
print_to_array
symbols
symbol values
symbol lines
symbol types
symbol flags
symbol linked-list forward links
hash code list beginnings
symbol names chunk addresses
property name strings
action name strings
attribute name strings
array name strings
It is illegal to nest routines using '#['
routine name
';' after ']'
directive, '[' or class name
At most 32 values can be given in a single 'switch' case
action (or fake action) name
',' or ':'
',', ':' or 'to'
local variable name or ';'
A routine can have at most 15 local variables
Local variable defined twice:
Multiple 'default' clauses defined in same 'switch'
':' after 'default'
'default' must be the last 'switch' case
switch value
braced code block after 'switch'
%y%m%d
%-20s %2d.%d%%
Standard
Advanced
Graphical
Extended
experimental format
module
story file
identifier name strings
action name strings
attribute name strings
array name strings
output buffer
This version of Inform is unable to produce the grammar table format requested (producing number 2 format instead)
This program has overflowed the maximum readable-memory size of the Z-machine format. See the memory map below: the start of the area marked "above readable memory" must be brought down to $10000 or less.
The %s exceeds version-%d limit (%dK) by %d bytes
In:%3d source code files %6d syntactic lines
%6d textual lines %6ld characters
(plain ASCII)
(ISO 8859-%d %s)
Allocated:
%6d symbols (maximum %4d) %6ld bytes of memory
Out: Version %d "%s" %s %d.%c%c%c%c%c%c (%ld%sK long):
Expected 'p' after '//' to give number of dictionary word
Obsolete usage: use the ^ character for the apostrophe in
Character can be printed but not input:
MAX_DICT_ENTRIES
%02x
noun
preposition:%d
preposition
metaverb:%d
verb:%d
Dictionary contains %d entries:
Z-machine alphabet entries:
[Dictionary contains %d entries:]
abbreviations
abbrev values
abbrev quality
abbrev freqs
red-black tree for dictionary
final dictionary ordering table
dictionary sort codes
dictionary
static strings holding area
low (abbreviation) strings
Main__
@print_obj a; ]
a; if (Z__Region(a)~=1) return RT__Err(36);
RT__ChPrintO
@print_paddr a; ]
a; if (Z__Region(a)~=3) return RT__Err(35);
RT__ChPrintS
@print_addr a; ]
a; if (Unsigned__Compare(a, #readable_memory_offset)>=0) return RT__Err(34);
RT__ChPrintA
@print_char c; ]
c fl; if (c==0 or 9 or 11 or 13) fl=1; if (c>=32 && c<=126) fl=1; if (c>=155 && c<=251) fl=1; if (fl==0) return RT__Err(33,c);
RT__ChPrintC
@storew base offset val; ]
base offset val a f; a=base+2*offset; if (Unsigned__Compare(a,#array__start)>=0 && Unsigned__Compare(a,#array__end)<0) f=1; else if (Unsigned__Compare(a,#cpv__start)>=0 && Unsigned__Compare(a,#cpv__end)<0) f=1; else if (Unsigned__Compare(a,#ipv__start)>=0 && Unsigned__Compare(a,#ipv__end)<0) f=1; else if (a==$0010) f=1; if (f==0) return RT__Err(27);
RT__ChSTW
@storeb base offset val; ]
base offset val a f; a=base+offset; if (Unsigned__Compare(a,#array__start)>=0 && Unsigned__Compare(a,#array__end)<0) f=1; else if (Unsigned__Compare(a,#cpv__start)>=0 && Unsigned__Compare(a,#cpv__end)<0) f=1; else if (Unsigned__Compare(a,#ipv__start)>=0 && Unsigned__Compare(a,#ipv__end)<0) f=1; else if (a==$0011) f=1; if (f==0) return RT__Err(26);
RT__ChSTB
@loadw base offset -> val;return val; ]
base offset a val; a=base+2*offset;if (Unsigned__Compare(a,#readable_memory_offset)>=0) return RT__Err(25);
RT__ChLDW
@loadb base offset -> val;return val; ]
base offset a val; a=base+offset;if (Unsigned__Compare(a,#readable_memory_offset)>=0) return RT__Err(24);
#ifdef INFIX; if (a ~= workflag && (obj1 has infix__watching || (debug_flag & 15))) print "[Giving ",(name) obj1," @@126", (DebugAttribute) a, "]^"; #ifnot; #ifdef DEBUG; if (a ~= workflag && debug_flag & 15) print "[Giving ",(name) obj1," @@126", (DebugAttribute) a, "]^"; #endif; #endif; @clear_attr obj1 a; ]
obj1 a; if (obj1<5 || obj1>(#largest_object-255) || obj1 in 1) return RT__Err(14,obj1); if (a<0 || a>=48) return RT__Err(19,obj1); if (obj1 hasnt a) return;
RT__ChGt
#ifdef INFIX; if (a ~= workflag && (obj1 has infix__watching || (debug_flag & 15))) print "[Giving ", (name) obj1, " ", (DebugAttribute) a, "]^"; #ifnot; #ifdef DEBUG; if (a ~= workflag && debug_flag & 15) print "[Giving ", (name) obj1, " ", (DebugAttribute) a, "]^"; #endif; #endif; @set_attr obj1 a; ]
obj1 a; if (obj1<5 || obj1>(#largest_object-255) || obj1 in 1) return RT__Err(14,obj1); if (a<0 || a>=48) return RT__Err(19,obj1); if (obj1 has a) return;
obj1; if (obj1<5 || obj1>(#largest_object-255) || obj1 in 1) return RT__Err(15,obj1);
RT__ChR
x=obj2; while (x~=0) { if (x==obj1) return RT__Err(18,obj1,obj2); x=parent(x); } #ifdef INFIX; if (obj1 has infix__watching || obj2 has infix__watching || (debug_flag & 15)) print "[Moving ", (name) obj1, " to ", (name) obj2, "]^"; #ifnot; #ifdef DEBUG; if (debug_flag & 15) print "[Moving ", (name) obj1, " to ", (name) obj2, "]^"; #endif; #endif; @insert_obj obj1 obj2; ]
obj1 obj2 x; if (obj1<5 || obj1>(#largest_object-255) || obj1 in 1) return RT__Err(16,obj1,obj2); if (obj2<5 || obj2>(#largest_object-255) || obj2 in 1) return RT__Err(17,obj1,obj2);
RT__ChT
copy: if (~~(a ofclass obj)) { RT__Err("copy", a, -obj); rfalse; } if (~~(b ofclass obj)) { RT__Err("copy", b, -obj); rfalse; } Copy__Primitive(a, b); rfalse; } ]
destroy: if (~~(a ofclass obj)) { RT__Err("destroy", a, -obj); rfalse; } if (a provides destroy) a..destroy(); Copy__Primitive(a, child(obj)); move a to obj; rfalse; remaining: return children(obj)-1;
obj id y a b c d x; switch(id) { create: if (children(obj)<=1) rfalse; x=child(obj); remove x; if (x provides create) { if (y==0) x..create(); if (y==1) x..create(a); if (y==2) x..create(a,b); if (y>3) RT__Err(1,obj); if (y>=3) x..create(a,b,c);} return x; recreate: if (~~(a ofclass obj)) { RT__Err("recreate", a, -obj); rfalse; } Copy__Primitive(a, child(obj)); if (a provides create) { if (y==1) a..create(); if (y==2) a..create(b); if (y==3) a..create(b,c); if (y>4) RT__Err(1,obj); if (y>=4) a..create(b,c,d); } rfalse;
Cl__Ms
x id n l; while ((n=0->x) ~= 0) { if (n & $80) { x++; l = (0->x) & $3f; } else { if (n & $40) l=2; else l=1; } x++; if ((n & $3f) == id) return x; x = x + l; } if (id<0) return x+1; rfalse; ]
x y u v; if (x==y) return 0; if (x<0 && y>=0) return 1; if (x>=0 && y<0) return -1; u = x&$7fff; v= y&$7fff; if (u>v) return 1; return -1; ]
Unsigned__Compare
addr; if (addr==0) rfalse; if (addr>=1 && addr<=(#largest_object-255)) rtrue; if (Unsigned__Compare(addr, #strings_offset)>=0) return 3; if (Unsigned__Compare(addr, #code_offset)>=0) return 2; rfalse; ]
Z__Region
else { print " has no property ", (property) id; p = #identifiers_table; size = p-->0; if (id<0 || id>=size) print " (and nor has any other object)"; } print " to ", (string) crime, " **]^"; ]
.RErr; if (obj>=0 && obj<=(#largest_object-255)) { if (obj && obj in Class) print "class "; if (obj) @print_obj obj;else print "nothing";print" ";} print "(object number ", obj, ") "; if (id<0) print "is not of class ", (name) -id;
16,17,18: print "move~ ", (name) obj, " to ", (name) id; if (crime==18) { print ", which would make a loop: ",(name) obj; p=id; do { print " in ", (name) p; p=parent(p);} until (p==obj); " in ", (name) p, " **]"; } " **]"; 19: "give~ or test ~has~ or ~hasnt~ with a non-attribute on the object ",(name) obj," **]"; 21: print ".&"; 22: print ".#"; 23: print "."; } "~ of ", (name) obj, " **]"; }
if (crime < 32) { print "tried to "; if (crime >= 28) { if (crime==28 or 29) print "read from "; else print "write to "; if (crime==29 or 31) print "-"; print "->", obj, " in the"; if(size>=8) { print" (->)"; size=size-8; } if(size>=4) { print" (-->)"; size=size-4; } switch(size){0,1:q=0; 2:print " string"; q=1; 3:print " table";q=1;} " array ~", (string) #array_names_offset-->p, "~, which has entries ", q, " up to ",id," **]"; } if (crime >= 24 && crime <=27) { if (crime<=25) print "read"; else print "write"; print " outside memory using "; switch(crime) { 24,26:"-> **]"; 25,27:"--> **]"; } } if (crime < 4) print "test "; else if (crime < 12 || crime > 20) print "find the "; else if (crime < 14) print "use "; if (crime==20) "divide by zero **]"; print "~"; switch(crime) { 2: print "in~ or ~notin"; 3: print "has~ or ~hasnt"; 4: print "parent"; 5: print "eldest"; 6: print "child"; 7: print "younger"; 8: print "sibling"; 9: print "children"; 10: print "youngest"; 11: print "elder"; 12: print "objectloop"; 13: print "}~ at end of ~objectloop"; 14: "give~ an attribute to ", (name) obj, " **]"; 15: "remove~ ", (name) obj, " **]";
crime obj id size p q; print "^[** Programming error: "; if (crime<0) jump RErr; if (crime==1) { print "class "; @print_obj obj; ": 'create' can have 0 to 3 parameters only **]";} if (crime == 32) "objectloop broken because the object ", (name) obj, " was moved while the loop passed through it **]"; if (crime == 33) "tried to print (char) ", obj, ", which is not a valid ZSCII character code for output **]"; if (crime == 34) "tried to print (address) on something not the ", "byte address of a string **]"; if (crime == 35) "tried to print (string) on something not a ", "string **]"; if (crime == 36) "tried to print (object) on something not an ", "object or class **]";
RT__Err
if (o1.&3 == 0 || o2.&3 == 0) return; for (n=o2.3: n-->0 ~= 0: n = n + size + 3) { identifier = n-->0; size = n->2; for (m=o1.3: m-->0 ~= 0: m = m + m->2 + 3) if ((identifier & $7fff == (m-->0) & $7fff) && size==m->2) for (l=3: l<size+3: l++) m->l = n->l; } ]
o1 o2 a1 a2 n m l size identifier; for (n=0:n<48:n++) { if (o2 has n) give o1 n; else give o1 ~n; } for (n=1:n<64:n++) if (n~=2 or 3) { a1 = o1.&n; a2 = o2.&n; size = o1.#n; if (a1~=0 && a2~=0 && size==o2.#n) { for (m=0:m<size:m++) a1->m=a2->m; } }
Copy__Primitive
if (cla notin 1) { RT__Err("apply 'ofclass' for", cla, -1);rfalse;} a = obj.&2; if (a==0) rfalse; n = obj.#2; for (j=0: j<n/2: j++) { if (a-->j == cla) rtrue; } rfalse; ]
obj cla j a n; if (obj<1 || obj > (#largest_object-255)) { if (cla ~= 3 or 4) rfalse; if (Z__Region(obj) == cla-1) rtrue; rfalse; } switch(cla) { 1: if (obj<=4) rtrue; if (obj in 1) rtrue; rfalse; 2: if (obj<=4) rfalse; if (obj in 1) rfalse; rtrue; 3, 4: rfalse; }
OC__Cl
if (identifier<64) { if (obj.&identifier ~= 0) rtrue; rfalse; } if (obj..&identifier ~= 0) rtrue; if (identifier<72 && obj in 1) rtrue; rfalse; ]
obj identifier; if (obj<1 || obj > (#largest_object-255)) { if (identifier ~= print or print_to_array or call) rfalse; switch(Z__Region(obj)) { 2: if (identifier == call) rtrue; 3: if (identifier == print or print_to_array) rtrue; } rfalse; }
OP__Pr
while (i-->0 ~= 0) { if (i-->0 == identifier or otherid) return $8000 + k*$100 + j; i = i + i->2 + 3; k++; } break; } } RT__Err("make use of", cla, identifier); rfalse; ]
cla identifier otherid i j k; if (cla notin 1 && cla > 4) { RT__Err("be a '::' superclass", cla, -1); rfalse; } if (self ofclass cla) otherid = identifier | $8000; for (j=0: #classes_table-->j ~= 0: j++) { if (cla==#classes_table-->j) { if (identifier < 64) return $4000 + identifier*$100 + j; if (cla.&3 == 0) break; i = cla.3;
RA__Sc
obj identifier x; if (identifier<64 && identifier>0) return obj.#identifier; x = obj..&identifier; if (x==0) rfalse; if (identifier&$C000==$4000) switch (((x-1)->0)&$C0) { 0: return 1; $40: return 2; $80: return ((x-1)->0)&$3F; } return (x-1)->0; ]
RL__Pr
if (self == obj) otherid = identifier | $8000; i = obj.3; while (i-->0 ~= 0) { if (i-->0 == identifier or otherid) return i+3; i = i + i->2 + 3; } rfalse; ]
if (identifier & $4000 ~= 0) { cla = #classes_table-->(identifier & $ff); identifier = (identifier & $3f00) / $100; if (~~(obj ofclass cla)) rfalse; i=0-->5; if (cla == 2) return i+2*identifier-2; i = 0-->((i+124+cla*14)/2); i = CP__Tab(i + 2*(0->i) + 1, -1)+6; return CP__Tab(i, identifier); } if (obj.&3 == 0) rfalse; if (obj in 1) { if (identifier<64 || identifier>=72) rfalse; }
obj identifier i otherid cla; if (obj==0) rfalse; if (identifier<64 && identifier>0) return obj.&identifier; if (identifier & $8000 ~= 0) { cla = #classes_table-->(identifier & $ff); if (cla.&3 == 0) rfalse; if (~~(obj ofclass cla)) rfalse; identifier = (identifier & $7f00) / $100; i = cla.3; while (identifier>0) { identifier--; i = i + i->2 + 3; } return i+3; }
RA__Pr
obj identifier x; x = obj..&identifier; if (x==0) { RT__Err("decrement", obj, identifier); return; } #ifdef INFIX; if (obj has infix__watching || (debug_flag & 15)) RT__TrPS(obj,identifier,(x-->0)-1); #ifnot; #ifdef DEBUG; if (debug_flag & 15) RT__TrPS(obj,identifier,(x-->0)-1); #endif; #endif; return (x-->0)--; ]
DA__Pr
obj identifier x; x = obj..&identifier; if (x==0) { RT__Err("decrement", obj, identifier); return; } #ifdef INFIX; if (obj has infix__watching || (debug_flag & 15)) RT__TrPS(obj,identifier,(x-->0)-1); #ifnot; #ifdef DEBUG; if (debug_flag & 15) RT__TrPS(obj,identifier,(x-->0)-1); #endif; #endif; return --(x-->0); ]
DB__Pr
obj identifier x; x = obj..&identifier; if (x==0) { RT__Err("increment", obj, identifier); return; } #ifdef INFIX; if (obj has infix__watching || (debug_flag & 15)) RT__TrPS(obj,identifier,(x-->0)+1); #ifnot; #ifdef DEBUG; if (debug_flag & 15) RT__TrPS(obj,identifier,(x-->0)+1); #endif; #endif; return (x-->0)++; ]
IA__Pr
obj identifier x; x = obj..&identifier; if (x==0) { RT__Err("increment", obj, identifier); return; } #ifdef INFIX; if (obj has infix__watching || (debug_flag & 15)) RT__TrPS(obj,identifier,(x-->0)+1); #ifnot; #ifdef DEBUG; if (debug_flag & 15) RT__TrPS(obj,identifier,(x-->0)+1); #endif; #endif; return ++(x-->0); ]
IB__Pr
4: z = indirect(x-->m, a, b, c, d); 5:z = indirect(x-->m, a, b, c, d, e); 6: z = indirect(x-->m, a, b, c, d, e, f); } self = sender; sender = s; sw__var = s2; if (z ~= 0) return z; 3: print_ret (string) x-->m; default: return x-->m; } } rfalse; ]
for (:2*m<n:m++) { if (x-->m==$ffff) rfalse; switch(Z__Region(x-->m)) { 2: s = sender; sender = self; self = obj; s2 = sw__var; #ifdef LibSerial; if (id==life) sw__var=reason_code; else sw__var=action; #endif; switch(y) { 0: z = indirect(x-->m); 1: z = indirect(x-->m, a); 2: z = indirect(x-->m, a, b); 3: z = indirect(x-->m, a, b, c);
if (id > 0 && id < 64) { x = obj.&id; if (x==0) { x=$000a-->0 + 2*(id-1); n=2; } else n = obj.#id; } else { if (id>=64 && id<69 && obj in Class) return Cl__Ms(obj,id,y,a,b,c,d); x = obj..&id; if (x == 0) { .Call__Error; RT__Err("send message", obj, id); return; } n = 0->(x-1); if (id&$C000==$4000) switch (n&$C0) { 0: n=1; $40: n=2; $80: n=n&$3F; } }
obj id a b c d e f x y z s s2 n m; if (obj < 1 || obj > #largest_object-255) { switch(Z__Region(obj)) { 2: if (id == call) { s = sender; sender = self; self = obj; #ifdef action;sw__var=action;#endif; x = indirect(obj, a, b, c, d, e, f); self = sender; sender = s; return x; } jump Call__Error;
CA__Pr
obj identifier x; x = obj..&identifier; if (x==0) { if (identifier >= 1 && identifier < 64) return obj.identifier; RT__Err("read", obj, identifier); return; } return x-->0; ]
RV__Pr
obj identifier value x; x = obj..&identifier; if (x==0) { RT__Err("write to", obj, identifier); return; } #ifdef INFIX; if (obj has infix__watching || (debug_flag & 15)) RT__TrPS(obj,identifier,value); #ifnot; #ifdef DEBUG; if (debug_flag & 15) RT__TrPS(obj,identifier,value); #endif; #endif; x-->0 = value; ]
a b c; print "Action <", a, " ", b, " ", c, ">^"; ]
R_Process
do { w = table --> lc; if (w ~= 0) print (string) w; lc++; if (lc > n) { print "]^^"; break; } print "^ "; } until (false); @output_stream 1; ]
do { @set_cursor line w; spaces maxw + 4; @set_cursor line w2; t = table --> lc; if (t~=0) print (string) t; line++; lc++; } until (lc > n); @set_cursor line w; spaces maxw + 4; @buffer_mode 1; style roman; @set_window 0; @split_window 1; @output_stream $ffff; print "[ "; lc = 1;
maxw table n w w2 line lc t; n = table --> 0; @add n 6 -> sp; @split_window sp; @set_window 1; w = 0 -> 33; if (w == 0) w=80; w2 = (w - maxw)/2; style reverse; @sub w2 2 -> w; line = 5; lc = 1; @set_cursor 4 w; spaces maxw + 4;
Box__Routine
Symb__Tab
The following name is reserved by Inform for its own use as a routine name; you can use it as a routine name yourself (to override the standard definition) but cannot use it for anything else:
veneer source code area
Verb %2d has %d lines
Action '%s' is numbered %d
new fake action name
%s__A
MAX_ACTIONS
There is no action routine called
Not an action routine:
MAX_ADJECTIVES
Two different verb definitions refer to
MAX_VERBSPACE
There is no previous grammar for the verb
an English verb in quotes
'*' divider
Too many lines of grammar for verb. This maximum is built into Inform, so suggest rewriting grammar using general parsing routines
MAX_LINESPACE
'->' clause
grammar token
'/' can only be used with Library 6/3 or later
grammar token or '->'
'/' can only be applied to prepositions
routine name after 'noun='
The 'topic' token is only available if you are using Library 6/3 or later
'=' after 'scope'
routine name after 'scope='
'=' is only legal here as 'noun=Routine'
No such grammar token as
Grammar line cut short: you can only have up to 6 tokens in any line (unless you're compiling with library 6/3 or later)
name of new or existing action
This is a fake action, not a real one:
'reverse' actions can only be used with Library 6/3 or later