Inform 6.43

A new release of Inform 6, version 6.43, is now available from the Inform 6 Github project, and from the IF-Archive: Release notes, source code and Windows console executable.

Credit for these changes goes to Andrew Plotkin and Henrik Åsman.

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_FLAG has 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 dict listings, 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 //p flag (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_VERSION has been added. Setting this has the same effect as the existing Grammar__Version constant, but provides a more standard way to set the grammar table version number.

  • A new grammar version 3 can be enabled with the $GRAMMAR_VERSION setting (or the Grammar__Version constant). 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_FLAG has been added. If set to 1, there is a new way to declare meta actions. Previously, meta actions were defined by writing lines like

      Verb meta 'score' * -> Score;

This associates the meta flag 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_FLAG is 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 Verb declarations for the same verb. This is now treated as if the subsequent declarations had been made with Extend, and a warning is produced to this effect.

  • The output of the --trace-verbs option 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_GLOBALS has 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_PADDING has 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 TEMP1

This now skips the TEMP1 step and stores directly to the variable.

  • When performing Z-code branch optimizations, if there is a @jump to an @rtrue/@rfalse/@ret_popped, the @jump opcode 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_SIZE was set sufficiently large.

  • In --trace asm output, when a Z-string has abbreviation marks, <ABBR> is printed, rather than Ctrl-A characters.

  • With the $OMIT_SYMBOL_TABLE option 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 dict and -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;
      }

Much of the optimization logic was contributed by @heasm66 !

This is great to see!

The developers that continue to maintain Inform provide an invaluable service to the IF community.

Thank you!

You’re quite right, I’ve edited the message to mention Henrik.

Compliments ! :tada:
Later I’ll try to compile under Linux (albeit I prefer installing binaries from the combined I6/Puny Linux source pack from DavidG, I think that I can test if there’s no issue under Linux, stdLib and Puny (and the other alternative libraries, triform, metrocenter, mInform and platypus…) )

only a question, perhaps I’m wrong and/or misunderstanding, but the $GRAMMAR_META_FLAG new feature isn’t redundant with the multiple verb declaration ? If I have actually understand correctly, with the latter feature, the meta flag example can be written as:

Verb 'Load'
  * noun -> push
Verb meta 'Load'
  * 'game' -> Restore

Or I missed some finer point ?

Confused regards from Italy,
dott. Piergiorgio.

Hello!

And thank you so much! That improvement of the meta definition is something I really needed! The verb ‘help’ comes immediately to mind - it is natural for players to assume that it links to a meta hint/tutorial/manual section, but depending on your adventure, it could very well be a normal verb in the game world. Being able to define a meta and non-meta version finally allows to set meta correctly for all cases.

Thank you, you really made my day!

Yours,
Deathworks

A word of caution.

The new handling of the meta flag needs library support before it fully works. I havn’t tested but I guess that if it’s used together with a library that don’t support it, all of a verbs actions becomes non-meta (if the dictionary flag don’t get set) or all of a verbs actions becomes meta (if the dictionary flag is set).

Hello!

So, I should better wait to switch to 6.43? I am currently on 6.42.

It is no big deal for me, as there are enough things I need to do, that work already with 6.42, so the switch is relatively low-priority for me.

Thanks for the information.

Yours,
Deathworks

You can do the switch, everything is backward compatible. But you can’t use the new GV3 and the meta-flag on individual actions until the library supports it, though.

According to @fredrik (who is busy adapting Puny to 6.43) will GRAMMAR_META_FLAG skip setting the meta-flag on the verbs in the dictionary, and if it is used with a library that don’t support it, no verbs will be meta, all actions will be non-meta.

In other words, please feel free to upgrade but don’t use GRAMMAR_META_FLAG until you have a library that supports it.

(Luckily Puny will be released shortly with support for both GV3 and meta-flag on actions.)

I hope you’re joking. That means any game that was written with the old grammar definitions will be broken if recompiled. By “broken”, I mean all the meta grammar definitions will need to be replaced in a manner yet to be determined, or everything done outside the game world (like SAVE, RESTORE, SCRIPT ON, SCRIPT OFF et al) will take one turn.

This is correct, if you go against Henrik’s advice and set GRAMMAR_META_FLAG for a game you compile with an old version of the library (e.g. PunyInform v5.14.1).

If you don’t set the flag, all works as before.

If you set the flag, or don’t set the flag, and use the new version of the library that’s coming out, all works as before.

Thanks. That makes sense.

I’m not sure about the standard library, but in PunyInform, you can declare a verb as meta in the action routine. For example, in answer to @Deathworks’s query, you can do a meta and non-meta version of HELP something like this:

Verb 'help'
  * -> Help
  * creature -> Help;

[ HelpSub;
  if (noun == nothing)
  {
    meta = true;
    "[Help text goes here]";
  }
  if (RunLife(noun, ##Help))
    rtrue;
  print_ret (The)noun, " doesn't need any help at the moment.";
];

Will you still be able to do this in future?

You will, but there will be less need to do so.

Also note that changing the meta-flag in the action routine is a compromise.

Before-routines run before a non-meta action, but not before a meta-action. If you alter the flag in the action routine, that’s after the before-stage.

After reading the release notes a bit more carefully, I can see that this change is there to allow just this sort of situation (i.e. meta and non-meta) without needing to set meta in the action routine, so that’s probably a good thing.

Test report:

compiles OK, out-of-zip, under Linux, and tested with -v3d2se and the appropriate +{library_path} gives these results with the various shell/skeletons (which is for which library should be evident, I hope):

-rw-r--r-- 1 pigi pigi   350  7 ago 15.01 3Shell.inf
-rw-r--r-- 1 pigi pigi 81408  7 ago 15.23 3Shell.z5
-rw-r--r-- 1 pigi pigi  1070  7 ago 15.26 metroshell.inf
-rw-r--r-- 1 pigi pigi 19456  7 ago 15.26 metroshell.z3
-rw-r--r-- 1 pigi pigi 19968  7 ago 15.26 metroshell.z5
-rw-r--r-- 1 pigi pigi  5271  7 ago 15.28 minform.inf
-rw-r--r-- 1 pigi pigi 22528  7 ago 15.28 minform.z3
-rw-r--r-- 1 pigi pigi 23040  7 ago 15.28 minform.z5
-rw-r--r-- 1 pigi pigi  3312 27 apr 10.24 minimal.inf
-rw-r--r-- 1 pigi pigi 25088  7 ago 15.35 minimal.z3
-rw-r--r-- 1 pigi pigi 26112  7 ago 15.35 minimal.z5
-rw-r--r-- 1 pigi pigi   369  7 ago 15.03 platskel.inf
-rw-r--r-- 1 pigi pigi 68096  7 ago 15.30 platskel.z5
-rw-r--r-- 1 pigi pigi   681 29 mag  2024 shell.inf
-rw-r--r-- 1 pigi pigi 60928  7 ago 15.22 shell.z5

all runs as designed under Linux frotz.

Later for a file size comparision with the current 2.42 from Griffith…

Best regards from Italy,
dott. Piergiorgio.

Hello,

Well, I am using the standard library, not punyinform, so I have to wait for that one to use the flag. But it is good to know I can already do the core switch.
Thanks for all the clarifications, everyone.

Yours,
Deathworks

(I think my current work-around is not to use meta for those dual cases. That is not too big an issue for me, with only minor inconsistencies. All good.)

I have updated the I6 Reference Addendum to describe all the new features.

To address some confusions…

According to @fredrik (who is busy adapting Puny to 6.43) will GRAMMAR_META_FLAG skip setting the meta-flag on the verbs in the dictionary

This is not correct. If you set GRAMMAR_META_FLAG when compiling an old game with an old library, the game will still work properly. Old-style Verb meta 'score' * -> Score declarations will behave properly. However, the new-style Verb 'load' * 'game' -> Restore meta declaration will not work, because the old library will not be looking for that feature.

TDLR: Only use the new-style declarations with a new library that supports them. It’s safe to use GRAMMAR_META_FLAG with using an old library, but it doesn’t buy you anything useful.