Releases: DavidKinder/Inform6
Inform 6.44
Inform 6.44 was released on 11th September 2025.
Features added
- Options specified on the command line now take precedence over options specified in the source code in
!%headers. Previously, the options specified in the source code took precedence.
Bugs fixed
-
A problem with dynamic memory reallocation used for buffers in the compiler, which could lead to spurious errors when compiling with Inform 6.43.
-
A case where the line number in a "no such constant" error message was wrong.
-
With
$ZCODE_COMPACT_GLOBALSturned on, references in functions to arrays before the array declaration were backpatched to an incorrect address. -
Output showing the Z-machine memory map gave an incorrect size for the global variables area with
$ZCODE_COMPACT_GLOBALSenabled. -
The optimization logic could read outside allocated memory if it encountered an undefined label.
Inform 6.43
Inform 6.43 was released on 6th August 2025.
Features added
-
A new dictionary word flag has been introduced, "singular", which is set for any noun that is not a plural. This can be explicitly set or not set in a dictionary word with the
'//s'syntax, i.e.'word//s'to set it, or'word//~s'to not set it. -
A new setting
$DICT_TRUNCATE_FLAGhas been added. If this is set to 1, then bit 6 of the dictionary word flag is set for any word whose source code definition is truncated to fit in the dictionary. In--trace dictlistings, this is shown as "tr" when the flag is set. Without this option, bit 6 of the dictionary word flag is set for all verbs (which is the old behavior, redundant with bit 0). If the compiler truncates only the//pflag (as in$LONG_DICT_FLAG_BUG), that does not count as truncating the dictionary word: the only relevant test is whether or not characters were dropped. -
A new setting
$GRAMMAR_VERSIONhas been added. Setting this has the same effect as the existingGrammar__Versionconstant, but provides a more standard way to set the grammar table version number. -
A new grammar version 3 can be enabled with the
$GRAMMAR_VERSIONsetting (or theGrammar__Versionconstant). This is a variation on grammar version 2 with a more compact data structure, and is only available for Z-code. Note that using this grammar version will require library changes that are not currently in the Inform 6 library. -
A new setting
$GRAMMAR_META_FLAGhas been added. If set to 1, there is a new way to declare meta actions. Previously, meta actions were defined by writing lines likeVerb meta 'score' * -> Score;This associates the
metaflag with the dictionary word "score". This is not ideal as we could have verbs which are meta in some phrasings but not others. If$GRAMMAR_META_FLAGis set the old syntax is still supported, but there is also a new syntax:Verb 'load' * noun -> Push * 'game' -> Restore meta;In this new approach, actions are sorted, with meta actions coming first. Game or library code can detect a meta action by comparing the action number with the new system constant
#highest_meta_action_number, which is the highest meta action number after sorting all the actions. -
It is now legal to have multiple
Verbdeclarations for the same verb. This is now treated as if the subsequent declarations had been made withExtend, and a warning is produced to this effect. -
The output of the
--trace-verbsoption now shows all verb synonyms, rather than just the first one. -
It is now an error to declare two verbs that refer to the same dictionary word. Previously this was accepted, but generated an incorrect story file.
-
A new setting
$ZCODE_COMPACT_GLOBALShas been added. If this is set to 1, then when compiling to Z-code, the compiler tracks how many global variables are used, and moves the start of arrays to immediately after that. If this is left as the default of 0, then the compiler always allocates 480 bytes in the story file's dynamic memory for globals. -
A new setting
$ZCODE_FILE_END_PADDINGhas been added. By default it is set to 1, but if it is set to 0, then when outputting a Z-code game file Inform 6 will no longer pad the file to be a multiple of 512 bytes. -
A warning is now issued if a dynamic string is used in another dynamic string or an abbreviation.
-
When compiling to Z-code version 3, the compiler now checks that the number of objects does not exceed the maximum possible, which is 255.
-
Various arithmetic opcodes are replaced with shorter versions:
@add x 0 -> x→ (skip)@add x 0 -> y→@store y x@add x 1 -> x→@inc x@sub x 0 -> x→ (skip)@sub x 0 -> y→@store y x@sub x 1 -> x→@dec x@mul x 1 -> x→ (skip)@mul x 1 -> y→@store y x@div x 1 -> x→ (skip)@div x 1 -> y→@store y x
-
The property operator previously generated code like the following:
@get_prop x p -> TEMP1 @store y TEMP1This now skips the
TEMP1step and stores directly to the variable. -
When performing Z-code branch optimizations, if there is a
@jumpto an@rtrue/@rfalse/@ret_popped, the@jumpopcode is replaced with the return opcode, which shortens the jump by one byte. In some cases this leaves the original return opcode unreachable. Unfortunately the dead-code-strip phase has already finished by this point so it is not convenient to detect this and strip it out.
Bugs fixed
-
Dictionary flags were being set incorrectly when
$DICT_WORD_SIZEwas set sufficiently large. -
In
--trace asmoutput, when a Z-string has abbreviation marks,<ABBR>is printed, rather than Ctrl-A characters. -
With the
$OMIT_SYMBOL_TABLEoption enabled, the<action>section was missing from the "gameinfo.dbg" file. -
Dictionary words in UTF-8 encoded source files are now printed correctly in
--trace dictand-r "gametext.txt"output. -
The compiler is now consistent in how it handles the redeclaration of a global variable in Z-code and in Glulx: this is allowed, provided that all declarations have the same initial value.
-
Dead code elimination no longer produces warnings on while loops where the closing brace cannot be reached, such as
while (true) { i--; if (i > 0) continue; break; }
Inform 6.42
Inform 6.42 was released on 10th February 2024.
Features added
-
The compiler can now handle switch cases which are expressions, rather than just looking for bare literals and symbols. The expression must still evaluate to a constant, but now parentheses and constant-folded arithmetic are handled:
Constant CONST = 5; ! These have always worked. switch (x) { 0: return 0; 1: return 1; -2: return -2; } ! These now also work. switch (x) { (0): return 0; (-(1)): return -1; (CONST): return 5; (CONST+1): return 6; }For backwards compatibility, the expression must be wrapped in parens, so
-(1):is not a valid case. Lists of expressions are also supported. Expression parsing applies as long as the first value is wrapped in parens. Wrapping the entire list in parens also works:switch (x) { 1, 2, 3: return 0; ! old style (4), (CONST), (CONST+1): return 1; ! new style (10), CONST+6, CONST+7: return 2; ! this also works (20, CONST+16, CONST+17): return 3; ! as does this }Note that the
tokeyword does not support expressions. You cannot say(CONST) to (CONST+5):as a case. Also, case expressions only work within a switch statement. Top-level action cases must still be bare action names. -
Inform identifiers can now be any length, and the entire identifier is significant. Dictionary words can also be any length. The
DICT_WORD_SIZElimit still applies, but now dictionary words are silently trimmed toDICT_WORD_SIZE. For Glulx,DICT_WORD_SIZEcan now be increased without limit. -
Arbitrary bytes and words can be compiled into the game, using two new statements:
@ -> BYTE BYTE BYTE ...; @ --> WORD WORD WORD ...;The given bytes or words are directly copied out into the function. (Words are two bytes in Z-code, and four bytes in Glulx.) The compiler assumes that the data forms valid opcodes, but does nothing to verify this. Bytes must be numeric constants, while words are either numeric constants or symbols, such as the name of a function.
-
A new setting exists to omit the symbol names table,
$OMIT_SYMBOL_TABLE. The symbol names table contains the names of all properties, attributes, fake actions, and arrays as strings, and is generally only used by debug library code and debug veneer error messages. When$OMIT_SYMBOL_TABLE=1is set:- The symbol names table is omitted from the game file, for both Glulx and Z-code.
- The
print (property) pstatement will print<number 72>(etc.) instead of the property name. - The runtime error for a non-existent property (obj has no property prop to read) will similarly print a number instead of the property name.
- The runtime error for array overflow (tried to read from -->5 in the array "arr"...) will omit the array name.
- The following system constants are not available, and trying to use one is a compile-time error:
#identifiers_table,#attribute_names_array,#property_names_array,#action_names_array,#fake_action_names_array,#array_names_offset,#global_names_array,#routine_names_array,#constant_names_array.
Note that the Inform 6 library uses
#identifiers_tablefor some debugging verbs, and the Infix library extension uses all the affected constants. To update such code, the relevant logic that uses these symbol names and constants would be put in a#Ifndef OMIT_SYMBOL_TABLE;block. -
A new setting
$ZCODE_MAX_INLINE_STRINGhas been added to determine how long a string can be and still be compiled to a@printopcode, rather than be added to the string segment and compiled to a@print_paddropcode. This setting has a default value of 32, which matches the previous behaviour of the compiler, where this limit was hard-coded at 32 characters. -
The Abbreviate directive now accepts abbreviations of any length.
-
The
-uoption, which computes abbreviations, can now generate abbreviations of any length. -
Inform is now able to correctly set the plural flag on long dictionary words (e.g.
'directions//p'). However, due to the way Inform 7 has defined plural kind names in the past, fixing this will affect the parsing of Inform 7 games if the output Inform 6 code is then compiled with a version of Inform 6 that fixes this issue. As a result, there is a new setting$LONG_DICT_FLAG_BUG, which defaults to 1. The new behaviour is only enabled if this setting is set to 0. -
Flags for dictionary words now include setting the NOUN flag, and also provides a way to explicitly not set a flag. The possible choices are:
//psets the PLURAL flag (bit 2)//nsets the NOUN flag (bit 7)//~pmeans do not set the PLURAL flag at this point//~nmeans do not set the NOUN flag at this point
Dictionary words used in most contexts default to
//n. -
The
--trace PROPSand--trace SYMDEFoptions now display the line number that each property or symbol is defined at. -
The
--trace ASM=2option now shows backpatch markers as a short descriptive string, rather than as a number. -
The statement
print "^";now compiles to a single opcode (@new_linefor Z-code, or@streamchar10 for Glulx) rather than printing a one character string. -
For Glulx, with strict mode turned off,
print (char) X;compiles to either@streamchar Xor@streamunichar X, depending on whether X is a compile-time constant less than 256, or not. -
Grammar table lines entries which have no verb are now omitted. When this occurs a warning is printed, as this most likely indicates an oversight in the game's source code.
-
Error messages about invalid tokens are now more informative.
-
Inform now handles line breaks itself, rather than relying on the C standard library. This gives consistent handling of Windows and Unix style line breaks on all platforms.
-
The output file "gametext.txt" now includes the Z-code or Glulx version being compiled to.
-
The Z-Machine opcodes added in revision 1.1 of the Z-Machine Specification Standard, set_true_colour and buffer_screen, are now supported.
Bugs fixed
-
The Glulx
random(x)built-in function now follows the DM4 specification: if x is positive, the function returns the result of1+(@random x); if zero or negative,@setrandomx is called. -
In several places (local variable declarations, action names and the
Switchesdirective) the compiler would accept quoted strings and then ignore the quotes. This is now an error. -
The case of a property having too many entries is now always an error, and is checked correctly in the case of compiling to Z-code V3.
-
An unclosed double quote at the end of a source file no longer causes the compiler to hang.
-
A number of issues relating to error messages giving incorrect information have been fixed by improving how the compiler handles backtracking through parsed symbols in some tricky cases.
-
The Z-code version of the veneer function
Box__Routine(which is used in the implementation of the box statement) now contains a check to prevent calling the@set_cursoropcode with negative co-ordinates. -
The veneer functions
RA__Pr(),RL__Pr()andCP__Tab()are now correct for Z-code V3. -
Errors in the declaration of arrays could sometimes cause the compiler to emit a large number of error messages, this is now fixed so that only the initial error is printed.
-
Invalid expressions like
(a++ b),(a ~b),(a++ ~b), and(a++ --b)previously caused an internal compiler error, but now produce a sensible error message. -
When computing abbreviations, the space character is now correctly treated as only occupying one byte, not four.
-
The argument supplied to the Z-machine opcode
@jumpis now interpreted correctly. Previously this was only done properly for thejumpstatement, not the opcode.
Inform 6.41
Inform 6.41 was released on 22nd July 2022.
Features added
-
The dead code elimination logic now allows forward jumps to labels that would be otherwise unreachable, like this:
if (condition) { jump MiddleLabel; } if (0) { while (condition) { ... .MiddleLabel; ... } } -
The error that occurs when the compiler encounters a jump to an unknown label now includes the name of that label.
Inform 6.40
Inform 6.40 was released on 15th July 2022.
Features added
-
The various command line arguments that produce tracing or statistical information have been consolidated in a new argument:
$!TRACEOPTor$!TRACEOPT=N. The Unix-style equivalent is--trace TRACEOPTor--trace TRACEOPT=N. You can also use$!by itself (or--helptrace) to list all available trace options. Trace option names are case-insensitive.The optional
Nis always an integer. 0 always means off, 1 is the base level, 2 or more may increase verbosity. As a general rule, settingNto a high number is not an error; it just does the same thing as the highest supported number for that option. (This lets us add more verbosity levels to any option without worrying about compatibility errors.)Four trace settings can be changed in mid-compile with the
Tracedirective. (This has always been true but now it is handled consistently.)Trace assembly,Trace expressions,Trace tokensandTrace linkerare equivalent to--trace asm,--trace expr,--trace tokensand--trace linker, respectively. As with the command-line versions, you can optionally specify 0 to turn off that setting or 2 or more for more verbosity.Four more trace directives do an immediate information dump:
Trace dictionary,Trace objects,Trace symbolsandTrace verbs. The command-line equivalents--trace dict,--trace objects,--trace symbolsand--trace verbsdo the same at the end of compilation.The following single-letter options have been removed and replaced with trace options:
-j: Replaced by--trace OBJECTS-m: Replaced by--trace MEM-n: Replaced by--trace PROPS(for property information) and--trace ACTIONS(for action numbers)-p: Replaced by--trace MAP=2-t: Replaced by--trace ASM=2-y: Replaced by--trace LINKER
The following single-letter options still exist, but are now aliases for trace options:
-a: Same as--trace ASM-f: Same as--trace FREQ-g: Same as--trace RUNTIME-s: Same as--trace STATS-z: Same as--trace MAP
The following single-letter options have been removed entirely:
-b: Has not done anything since at least Inform 5.-l: Was supposed to list all statements compiled, but it was never implemented.-o: Showed the same information as-zor--trace MAP.
The
-loption did show include files being opened; this is now a separate trace setting,--trace FILES.Some of the information that used to be under
-a4is now a separate trace setting,--trace BPATCH. -
The
-uoption now just outputs computed abbreviations. If you want the verbose calculation information that it used to print, use--trace FINDABBREVSor--trace FINDABBREVS=2. -
The compiler is now capable of dead code elimination, allowing it to:
- Discard unreachable opcodes and strings.
- Minimize generated code for dead branches (
if (0),if (1)). - Detect
ifandswitchstatements where every branch returns. - Detect loops that never exit (or always return).
- Discard
@jz constantopcodes where the constant is non-zero. - Convert
@jz 0to an unconditional@jump. - Discard a
@jumpto the very next instruction. - Discard store opcodes when computing a logical expression as a value, if one case (0 or 1) is impossible.
- Fold expressions like
(0 && expr)and(1 || expr), even whenexpris not a constant.
When statements that can never be reached are eliminated, a warning is produced, where appropriate.
Dead code elimination does mean that theoretically possible (though very odd) valid code will now result in a compilation error. For example,
if (DOSTUFF) { while (condition) { ... .MiddleLabel; ... } } jump MiddleLabel; ! errorThis will fail with a compilation error if
DOSTUFFis defined as a constant zero. This optimization can be turned off by setting the compiler setting$STRIP_UNREACHABLE_LABELSto zero (its default is one). -
There are now further warnings if the compiler detects that the type used in certain expressions is not correct:
X(),indirect(X): X must be a routineX.Y,X.&Y,X.#Y: X must be a class or an object; Y must be a property (the Y checks already existed)X.Y(): X must be a class, object, string or routine; Y must be a propertyX.Y++,X.Y--,++X.Y,--X.Y: X must be a class or an object; Y must be a property
-
There is a new syntax for dynamic-string interpolations:
"@(N)". The original syntax was"@NN", which is still supported. In the new syntax"N"can be a number, or an already defined numeric constant. As a result of this, under Glulx the limit on$MAX_DYNAMIC_STRINGSbeing less than 100 has been removed. -
The constants
#dictionary_tableand#grammar_tableare now available when compiling to Z-code, as well as Glulx. -
The command line switch to display percentages (
-p) now works with Glulx, and acts as an extension to the-zswitch. -
The double precision floating point related opcodes added to the Glulx 3.1.3 specification (that is,
@numtod,@dtonumz,@dtonumn,@ftod,@dtof,@dceil,@dfloor,@dadd,@dsub,@dmul,@ddiv,@dmodr,@dmodq,@dsqrt,@dexp,@dlog,@dpow,@dsin,@dcos,@dtan,@dasin,@dacos,@datan,@datan2,@jdeq,@jdne,@jdlt,@jdle,@jdgt,@jdge,@jdisnan,@jdisinf) are now supported. In addition there are also two new macros@dloadand@dstore, to load and store double precision floating point values. -
The undo related opcodes added to the Glulx 3.1.3 specification (that is,
@hasundoand@discardundo) are now supported. -
The
VersionandSwitchesdirectives are now deprecated, and produce a warning if used. The recommended way to set the Z-code version and any other switches is to use the command line, or!%comments at the top of the source file. -
The ability to compile Inform source code as modules, and then later link it, has been removed. This functionality always had significant restrictions and was never widely used. The
-Mand-Ucommand line options have been removed, along with the+module_pathoption. TheLinkandImportdirectives now just produce errors. -
The ability to use temporary files for internal storage (the
-Fswitch and the+temporary_pathoption) have been removed. -
The
=sign in theGlobaldirective is now optional, just as it is in theConstantdirective. So all of these are now legal:Constant c1 11; Constant c2 = 22; Global g1 33; Global g2 = 44; -
The long deprecated forms of the
Globaldirective that could define arrays have been removed. All these are now no longer legal:Global array --> size; Global array data ...; Global array initial ...; Global array initstr ...;
Bugs fixed
-
Abbreviationdirectives now only add abbreviations to the output file if economy mode (-e) is set. -
An array overrun when the
$ZCODE_LESS_DICT_DATAsetting is enabled has been fixed. -
The logic that allows a test for the compiler version of the form
#IfDef VN_1640now requires what follows the "VN_" to be a number.
Inform 6.36
Inform 6.36 was released on 25th January 2022.
Features added
-
The algorithm used to apply abbreviations for Z-code has been replaced with a more efficient dynamic programming algorithm, based on the paper by R.A. Wagner "Common phrases and minimum-space text storage", Communications of the ACM, 16 (3) (1973).
-
Inform has been refactored to use dynamic memory allocation rather than fixed size buffers. As a result, the following settings are now removed: if the available space is filled, Inform will allocate more memory without requiring user intervention.
- ALLOC_CHUNK_SIZE
- SYMBOLS_CHUNK_SIZE
- MAX_ABBREVS (removed only for Glulx)
- MAX_ACTIONS
- MAX_ADJECTIVES
- MAX_ARRAYS
- MAX_CLASSES
- MAX_DICT_ENTRIES
- MAX_EXPRESSION_NODES
- MAX_GLOBAL_VARIABLES
- MAX_INCLUSION_DEPTH
- MAX_INDIV_PROP_TABLE_SIZE
- MAX_LABELS
- MAX_LINESPACE
- MAX_LINK_DATA_SIZE
- MAX_LOCAL_VARIABLES (now a constant)
- MAX_LOW_STRINGS
- MAX_NUM_STATIC_STRINGS
- MAX_OBJ_PROP_COUNT
- MAX_OBJ_PROP_TABLE_SIZE
- MAX_OBJECTS
- MAX_PROP_TABLE_SIZE
- MAX_QTEXT_SIZE
- MAX_SOURCE_FILES
- MAX_STATIC_DATA
- MAX_STATIC_STRINGS
- MAX_SYMBOLS
- MAX_TRANSCRIPT_SIZE
- MAX_UNICODE_CHARS
- MAX_VERBS
- MAX_VERBSPACE
- MAX_ZCODE_SIZE
As a result of this, the memory size command line arguments (
$SMALL,$LARGEand$HUGE) are now redundant, and have been removed. -
It is now possible to declare an individual property with the
Propertydirective:Property individual propname; -
A new setting
$ZCODE_LESS_DICT_DATAhas been introduced. When set to a non-zero value, this tells the compiler to omit the last byte of Z-code dictionary entries (which can be referred as#dict_par3), as this is commonly unused. -
There are now warnings if the compiler detects that the type used in certain expressions is not correct. This only checks expressions that contain defined symbols, and does not change the generated code. The checks are:
remove O: O is an objectmove O to P: O is an object; P is an object or a classgive O A: O is an object; A is an attributeO has/hasnt A: O is an object; A is an attributeO in/notin P: O is an object; P is an object or a classX ofclass C: C is a classX provides P: P is a propertyX.P,X.P(),X.&P,X.#P: P is a property
-
Assembly output (
-amode) now shows symbolic information for each assembly operand, if possible. -
The
-uswitch now generates$MAX_ABBREVSpossible abbreviations. -
The
Trace verbsdirective now prints out the entire grammar table. -
Using the
-Dswitch when the game or library does not supportdebug_flagnow produces an explanatory warning:DEBUG mode is on, but this story or library does not appear to support it -
Expressions of the form
(x <= y or z)or(x >= y or z)now produce a warning message: while their effect is documented, well defined, and is not being changed, it is not necessarily what a user might expect. -
The check for whether an abbreviation actually reduces the size of the Z-code output file has been made more accurate, and the message if an abbreviation does not reduce the size is now a warning, rather than an error.
Bugs fixed
-
For Glulx, stub functions (and the veneer function
Symb__Tab()) are now always compiled as local-argument functions (with a type byte of 0xC1). Previously, they were in some cases compiled as stack-argument functions (with a type byte of 0xC0). -
Counts of properties in errors and in the statistics report (output with the
-sswitch) are now consistent, and reflect how many properties the user can define. -
The check that there are not too many common properties defined now correctly excludes individual and alias properties.
-
Inform will now report an error if the "class" line of a class definition mentions the class being defined.
-
A crash when compiling a malformed array declaration has been fixed.
Inform 6.35
Inform 6.35 was released on 22th May 2021.
Features added
-
Some Unix-style command line options are now supported, primarily to avoid the use of $ in command lines (although the old syntax is still supported). The new syntax for these options is:
--help --path PATH=dir --addpath PATH=dir --list --size huge, --size large, --size small --helpopt SETTING --opt SETTING=number --config filename -
Numeric constants can be declared as command line options, either like a setting:
$#SYMBOL $#SYMBOL=NUMOr as a new Unix-style command line option:
--define SYMBOL --define SYMBOL=NUMThis defines SYMBOL as a constant, just like the
Constantdirective. Like that directive, if no value is supplied, it defaults to zero. -
The settings
$MAX_ABBREVSandMAX_DYNAMIC_STRINGScontrol the number of abbreviations and the number of dynamic strings, respectively. When compiling to Z-code these settings are linked, as they both use the same 96 Z-code abbreviations that are available. -
The setting
$TRANSCRIPT_FORMATcontrols the output format of the-roption. The default is still the same format as before, (and can be explicitly selected with$TRANSCRIPT_FORMAT=0), but$TRANSCRIPT_FORMAT=1enables the new, more informative and machine-readable format. -
The
Origsourcedirective, added in version 6.34, is now used in error reporting, regardless of the error format selected. (Previously it only appeared with the default error message format, E0.) -
If an attempt is made to redefine an existing symbol, there is now a clearer error message, explaining what the error is and where the symbol was previously defined.
-
-g3is now a valid option: it enables tracing for all routines, including the veneer. This functionality was added back in Inform 6.21, but the code to check the actual option was omitted. -
Using the option
-k(which turns on the generation of debugging information) no longer implies-D(which turns on debug mode).
Bugs fixed
-
Only the following directives are now allowed in a function or object definition: all others give an error:
#ifv3 #ifv5 #ifdef #ifndef #iftrue #iffalse #ifnot #endif #message #origsource #trace -
An
#ifdefstatement at the start of aswitchblock now compiles correctly, and no longer gives a spurious error. -
The following, incorrect forms of array declaration now generate an error:
Array foo --> 'dictword'; Array foo --> FunctionName; Array foo --> []; -
If a common property array overflows when compiling to Z-code version 3, the object is no longer corrupted.
-
The incorrect code
Object foo with name 'x';now correctly causes the warning
'name' property should only contain dictionary wordswhen compiled to either Glulx or Z-code: previously the warning only appeared when compiling to Z-code.
-
The compiler now correctly handles
#Ifdirectives aroundifandelseclauses. -
Forward declared properties (that is, properties that are used before they are defined in the game source code) now work correctly.
-
Where directives allow a constant to be used (
Release,Version,Dictionary,IftrueandIffalse), the compiler now reports an error if the constant is not defined. -
When compiling to Z-code version 3, dictionary words are now correctly truncated at 6 Z-characters (instead of 9).
-
When compiling to Z-code version 3, two dictionary words that differed only in Z-characters 7-9 would lead to two identical dictionary entries: now there will only be one entry.
Inform 6.34
Inform 6.34 was released on 25th May 2020.
Features added
-
The following system constants are now supported for Glulx: #highest_class_number, #highest_object_number, #lowest_attribute_number, #lowest_action_number, #lowest_routine_number, #lowest_array_number, #lowest_constant_number, #lowest_class_number, #lowest_object_number, and #lowest_property_number.
-
Unicode characters can now be included in Glulx word arrays as literals, e.g.
Array text1 table "A @{1c4} A"; Array text2 --> "A @oef A"; -
For Glulx, high-plane Unicode characters in the range $100000 to $10FFFF are supported in UTF-8 source code, and in
@{...}sequences, which can now contain up to six hex digits. -
The new command line switch -V simply prints the version and date of the compiler and then exits.
-
The new setting $SERIAL sets the six digit serial number written into the header of the game, e.g.
$SERIAL=160305 -
It has always been possible to replace the paths used by the compiler with a command line option of the form +include_path=foo. It is now possible to add to an existing path without replacing it by using an additional '+' character, like so: ++include_path=foo.
-
The Replace directive can now be applied to routines in any file, whether it has the System_file directive or not. Replace also now works on recursive functions, which it previously did not. Its behavior can now be described this way:
Replace Func; Replace Func OriginalFunc; -
Multiple definitions of Func() may follow this directive. Func will refer to the last-defined version, except that definitions in normal files are preferred over definitions in System_file files or the veneer. With the two-symbol form (introduced in 6.33), the latter symbol will refer to the first-defined version of the function.
-
A new Origsource directive has been added to allow a record of the location of the relevant in a higher-level language that has been converted to Inform 6. (In practice, this will very likely be the location in an Inform 7 source.) The syntax is
Origsource <file> Origsource <file> <line> Origsource <file> <line> <char> OrigsourceThe first three forms declare that all following lines are derived from the named Inform 7 source file (with an optional line number and character number). This will be reported in error messages and in debug output. The declaration holds through the next Origsource directive (but does not apply to included files). The fourth form, with no arguments, clears the declaration. Unlike the Include directive, Origsource does not open the named file or even verify that it exists. The filename is treated as an opaque string.
-
The constant $INDIV_PROP_START is now a setting that can be changed for Glulx.
-
Arrays that are never modified can be declared as "static": in Z-code, this places the array at the end of readable memory (after the dictionary and before the beginning of code storage); in Glulx, it places the array at the end of ROM (after string storage). The syntax is
Array arrayname static --> 1 3 5 7 9 11 13 15;
Bugs fixed
-
It is no longer possible to cause values to be pushed onto the stack but not then pulled by evaluating a logical expression but not assigning or using the result of that expression.
-
Replacing a recursive function now works correctly.
-
The output for the $list command line argument now includes the value of the $MAX_ARRAYS setting.
-
Memory settings can no longer overflow if set to very large values. These values are limited to a maximum of 999999999: setting them higher just results in a warning.
-
The debugging output file now contains the correct function addresses even when the compiler has been told to omit unused functions.
-
Invalid statements with empty parentheses (like
return ();) now generate a sensible error. -
Crashes caused by over-long identifiers have been fixed. Note that as a result, the previously allowed (although undocumented) use of strings or dictionary words in an action-based (implicit) switch statement now causes an error.
-
The object table is now always generated at an even Z-Machine address, as the logic in the veneer routine
RA__Pr()requires this. -
The F and u options are now explicitly disallowed with the Switches directive.
-
Assigning values to system functions now leads to an error message, rather than a crash.
-
Crashes due to over-long abbreviations have been fixed.
-
Representing the at symbol
'@'by@{0040}now works when compiling to Glulx. -
The USE_TEMPORARY_FILES option no longer has a bug that led to files being closed more than once.
-
The platform-specific definitions in header.h for Unix have been cleaned up: "UNIX64" has been removed, since it was identical to "UNIX"; and "UNIX" no longer implies "USE_TEMPORARY_FILES".
-
The platform-specific definitions in header.h for the Macintosh have been cleaned up: "MACINTOSH" is now "MAC_CLASSIC"; "OSX" is now "MACOS", and "MACOS" now uses "HUGE_SIZE" for the default array sizes.
-
The maximum length of a verb is now limited to 120 (which can be changed in the source code). Previously very long verbs would crash the compiler.
-
Compiling to Z-code version 3 has shown a number of regressions since Inform 6.15:
- Diverted actions, of the form
<<ACTION>>, are fixed. - The veneer routine
RA__Pr()can be used.
- Diverted actions, of the form
Inform 6.33
Inform 6.33 was released on 13th May 2014.
Features added
-
Unused routines can now be detected and omitted from the compiled game, through two new settings. If $WARN_UNUSED_ROUTINES is set to 1, unused routines (other than those in the Inform library) are reported during compilation; if it is set to 2, unused routines anywhere, even in the library, are reported. If $OMIT_UNUSED_ROUTINES is set to 1, unused routines are omitted.
-
A new command line switch -Cu can be used to specify that the source file character set is UTF-8, allowing source files to contain Unicode characters beyond those defined in ISO 8859-1 to 8859-9.
-
A new #Undef directive will cause a previously defined constant to become undefined.
-
#Ifdef directives are now allowed within an object declaration.
-
Action statements can have an optional extra ‘actor’ argument, allowing action statements of the form
<Take pie, orc>; ! simple form <<Look, floyd>>; ! auto-returning formNote that this also requires a library change to be useful.
-
A previously declared routine can be renamed with a new form of the Replace directive. For example, if a source file contained
Replace Banner OriginalBanner;It could then (after including the library) contain this definion of a function:
[ Banner; OriginalBanner(); print "Extra version info!^"; ];The library's banner code would then be in OriginalBanner().
-
The previously deprecated Dictionary directive can now have the following forms:
Dictionary 'word'; Dictionary 'word' val1; Dictionary 'word' val1 val3;The first of these forms just adds the word to the dictionary, with all flags set to zero, if it is not already in the dictionary. The second form also sets the dict_par1 flag to the given value, or bitwise-or’s the value in if the word already exists. The third form also sets the dict_par3 in the same way as for dict_par1.
The values can be numeric literals or constants. They can be 0-255 for Z-code, or 0-65535 for Glulx.
-
The “font on” and “font off” statements now call the
@set_fontopcode for Z-code V5 and higher. -
The Glulx version of the Unsigned__Compare() veneer routine has been changed to a more efficient implementation, using Glulx’s unsigned comparison opcodes.
-
The debugging output file, generated when the -k is used, has been changed to a new, XML-based format.
-
Two new Z-code settings have been added to support the extra words in the header extension table specified in section 11.1.7 of the Z-Machine Standards Document version 1.1. $ZCODE_HEADER_EXT_WORDS specifies how many extra words to add (so for all three words defined in the 1.1 standard, this would be set to 3). $ZCODE_HEADER_FLAGS_3 specifies the value to put in the first of these three words, which is the "flags3" field.
-
A new Glulx setting $GLULX_OBJECT_EXT_BYTES has been added, which specifies an amount of additional space to add to each object record. The default is 0.
Bugs fixed
-
Function calls of the form f(g)(h) (that is, where f() returns the address of a function that is called with h as its argument) are now compiled correctly: previously, such calls were compiled as if the code was f(g(h)).
-
The bounds checking related to internal arrays that are are sized from various compiler settings has been improved, so that it should not be possible to crash the compiler if these settings are too small. In addition, a start has been made on allowing the compiler to grow its internal buffers, rather than relying on these settings to specify sufficient buffer sizes.
-
The error message shown when too many global variables are declared now tells the user to increase the $MAX_GLOBAL_VARIABLES setting.
-
The setting $MAX_CLASS_TABLE_SIZE, which was not used anywhere, has been removed.
-
The compiler no longer crashes if run with the -k switch and passed a source file containing no routines at all.
-
Floating-point constants in “#Ifdef TARGET_GLULX;” sections do not now cause an error when compiling to Z-code.
-
The error message produced if an action routine is not found for an action name has been improved to include the action name, and a sensible line number.
-
The compiler is now better at not producing spurious additional errors after it has encountered a directive that contains an error.
-
The compiler no longer crashes when reporting errors after line 65,535 in long Inform 6 source files.
-
The compiler now reports a meaningful text compression rate when outputting statistics for Glulx with the -Gs switches.
-
An error is now reported if a source file ends with an unterminated object definition.
-
The three argument form of the read statement no longer assumes that the routine passed as the third argument to the statement will not change the global variable that the statement uses internally.
-
The 'Abbreviate' statement now works with words containing non-English characters.
-
Attempting to use
@popopcode for V5 or higher no longer results in a crash. -
The Glulx setting $NUM_ATTR_BYTES, which determines the number of bytes in an object set aside for attribute flags, now works correctly. Note that this has required a change to the veneer routines that conflicts with the definition of FUNC_2_CP__Tab() in the ‘Accelerated Functions’ section of the Glulx 3.1.2 specification. If you change this setting, you should take great care if you also use the Glulx accelerated functions feature (as Inform 7 does by default).
-
The syntax of declaring a function so that it prints its name and arguments:
[ Whatever * x y; ! Whatever function logic ... ];is now supported for Glulx.
-
The statistics produced by the -s compiler switch are now correct for Glulx.
Inform 6.32
Inform 6.32 was released on 24th December 2010.
Features added
-
The Z-machine opcodes for pushing and pulling values from the stack are
@pushand@pull, used like this:@push x; @pull x;However for Glulx the opcode syntax is different: instead the
@copyopcode is used:@copy x sp; @copy sp x;The compiler now supports the
@pushand@pullsyntax under Glulx as an alias for@copy, allowing the same code to be used for both the Z-machine and Glulx. -
Custom Glulx opcodes (such as opcodes that post-date the compiler) can now be specified with the custom opcode syntax. The format of this syntax is
@"FlagsCount:Code"Flags (which are optional) can include “S” for store, “SS” for two stores, “B” for branch format, or “R” if execution never continues after the opcode. Count is the number of arguments (currently limited to 0-9), and Code is a decimal integer representing the opcode number.
For example,
@"S3:123"is the syntax for a three-argument opcode (load, load, store) whose opcode number in decimal is 123, and@"2:234"is the syntax for a two-argument opcode (load, load) whose number is 234. -
When compiling to Glulx, the Glulx format version number of the resulting story file is usually determined by which Glulx opcodes are used in the source code. This version number can now be over-ridden by providing a -v command line argument after the -G switch to select Glulx mode. For example, the arguments -G -v3.1.0 set the Glulx version number to “3.1.0”.
-
The Unicode related opcode added to the Glulx 3.0.0 specification,
@streamunichar, is now supported. -
When compiling to Glulx, characters outside of the ISO 8859-1 range can now be used in strings. The maximum number of such characters allowed is determined by a new memory setting, $MAX_UNICODE_CHARS.
-
When compiling to Glulx, the syntax
print (char) value;now works for values greater than 255, printing the appropriate Unicode character. (For such values
@streamunicharis used; for those less than or equal to 255,@streamcharis used as before.) -
The memory heap related opcodes added to the Glulx 3.1.0 specification (that is,
@mzero,@mcopy,@mallocand@mfree) are now supported. -
The acceleration related opcodes added to the Glulx 3.1.1 specification (that is,
@accelfuncand@accelparam) are now supported. There is also a new syntax to get the address of a global variable var, with the expression “#g$var”: this is provided so that such addresses can be provided to the@accelparamopcode. -
The floating point related opcodes added to the Glulx 3.1.2 specification (that is,
@numtof,@ftonumz,@ftonumn,@ceil,@floor,@fadd,@fsub,@fmul,@fdiv,@fmod,@sqrt,@exp,@log,@pow,@sin,@cos,@tan,@asin,@acos,@atan,@atan2,@jfeq,@jfne,@jflt,@jfle,@jfgt,@jfge,@jisnanand@jisinf) are now supported. -
Floating point constants can be used in the Inform source code. Thes constants are expressed in the form “$+1.0e+1”: that is, a dollar sign, followed by a plus or minus sign, followed by a floating point number, and then optionally a positive or negative integer exponent. Inform does not attempt anything other than converting these constants to their 32-bit integer representation: there is no constant folding as there is with integers, so the expression “$+1.0 + $+1.0” is not meaningful, and does not produce the floating point value “2.0”.
As an example of the use of these constants, the following adds together 100 and 123.45:
@fadd $+100 $+1.2345e+2 result;The compiler also defines the constants “FLOAT_INFINITY”, “FLOAT_NINFINITY” and “FLOAT_NAN” for positive infinity, negative infinity and “not a number”, respectively.
-
Glulx has a simple memory extension feature, where the game’s header declares the memory space to be larger than the game file. The extra space is filled out with zeroes when the game starts. This is now supported by a new option $MEMORY_MAP_EXTENSION. This defaults to 0: if it is redefined to a larger value then the size of the game’s memory space is extended by that amount.
-
The number of verbs allowed by the compiler when compiling to Glulx is no longer limited to fewer than 256. As part of producing the game file, the compiler creates a dictionary table that contains verb numbers. However, despite in Glulx there being space for a verb number between 0 and 65535 in this table, only one byte of it (that is, values between 0 and 255) was used. This has been fixed.
However, this also requires library changes to be useful, as the library makes use of this dictionary table. The library used by Inform 7 has been adjusted to take advantage of this, but the Inform 6/11 library has not.
-
The dictionary of Glulx games can now contain characters outside of ISO 8859-1. There is a new memory setting, $DICT_CHAR_SIZE: by default this is 1, but setting it to 4 causes the compiler to create a dictionary containing 32-bit Unicode characters.
However, this also requires library changes to be useful, as the library makes use of this dictionary table.
Bugs fixed
-
Strict mode is no longer enabled by default when generating V3 and V4 Z-code files, as strict mode makes use of opcodes that are V5+ only.
-
The base unit of Inform’s internal memory allocation for various structures (for example the buffer used to hold the generated code) is no longer fixed: it is now controlled by a setting $ALLOC_CHUNK_SIZE. This allows, for example, the maximum Glulx code size to be greater than 640Kb.
-
When compiling to Glulx, the stack size of the resulting story file is no longer fixed at 4096: it can be changed by the setting $MAX_STACK_SIZE.
-
The compiler could crash if the size of the grammar table exceeded the size of the Z-machine readable memory: this is now fixed.
-
Creating a Z-code game file with precisely 64Kb of readable memory produced an invalid file. This is now prevented, so that the largest readable memory size is 64Kb minus 2 bytes.
-
Previously, under Glulx the print_to_array() function could be called with either two arguments, specifying both the array to print to and its length, or just one argument, the later matching what is allowed when compiling to Z-code. This one argument form has now been withdrawn under Glulx as a security hole, and a source to problems with writing beyond the end of the array: now the array length must be specified. (See also Features available only in Glulx.)
-
Veneer routines are no longer excluded from Inform’s assembly output (which is accessed with the -a command line switch).
-
For Linux and other Unix variants the default memory settings have been increased, which should remove the need to change the compiler settings when building large projects on these platforms.
-
For Mac OS X, the maximum length of a file path is now 8192 characters, which should prevent any further problems with long paths on this platform.