[I6] List of true character storage costs for "typewriter symbols" in I6 dictionary words?

DM4 p. 207 mentions that “numerals or typewriter symbols… cost as much as
two ordinary letters” for storage within a dictionary word. Does this vary
at all, i.e. are there supposed to be symbols that cost more than 2 letters?
If so, is there any list somewhere of the exact character “cost” of various
symbols?

Note that, using Inform 6.31, it seems like the “%” symbol has a cost of
four characters. At least, the compiler seems to treat them this way when
constructing stored words. Code:

print "</?%?/ stored as ", (address) '/?%?/', ">^";
print "</a/a/a/ stored as ", (address) '/a/a/a/', ">^";
print "<????? stored as ", (address) '?????', ">^";
print "<%%%%% stored as ", (address) '%%%%%', ">^";
print "<%a%a% stored as ", (address) '%a%a%', ">^";
print "<a%a%a stored as ", (address) 'a%a%a', ">^";

produces output:

</?%?/ stored as /?%>
</a/a/a/ stored as /a/a/a>
<????? stored as ????>
<%%%%% stored as %%>
<%a%a% stored as %a%>
<a%a%a stored as a%a>

Is this expected behavior?

Page 260 of DM4 gives the following info:

Zcharacter "abcdefghijklmnopqrstuvwxyz"
           "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
           "0123456789!$&*():;.,<>@{386}";

Characters in alphabet 1, the top row, take only one Z-character to print; characters in
alphabets 2 and 3 take two Z-characters to print; characters not in the table take four.

(This table is given as an example of a customisation, and is not representative of the actual defaults. See below for the actual default table.)

The dictionary is ordinarily stored in lower case, so the capital letters don’t count towards this.

There’s more info on the ZSCII table here.

1 Like

Thanks for the pointer, @mirality. Section 3.5.3 of the Z-machine documentation page has it!