DavidKinder / Inform6

The latest version of the Inform 6 compiler, used for generating interactive fiction games.
http://inform-fiction.org/
Other
199 stars 32 forks source link

Impossible to use custom alphabet for 4 first objects #276

Open heasm66 opened 3 months ago

heasm66 commented 3 months ago

When using a custom alphabet there's no way to apply the alphabet on the first for objects (Class, Object, Routine and String), the descriptions are always done in the default alphabet for these objects. Guess it's because they are defined before a single line in the story-file is read. Not very important but it is a bit annoying.

erkyrath commented 3 months ago

The result of this is that the class-object names come out wrong if you redefine the basic alphabet characters. For example:

! Swap "c" and "C"; swap "t" and "i"
Zcharacter "abCdefgHtjklmnopqrsiuvwxyz"
           "ABcDEFGhIJKLMNOPQRSTUVWXYZ"
           "0123456789!$&*():;.,<>`";

[ Main;
    print "Class objects: ", (object) Class, " ", (object) Object,
        " ", (object) Routine, " ", (object) string, "^";
];

Class objects: class ObjeCi Rouitne Sirtng

This is a bug but, as you say, not very important. (These objects are generally only printed for debugging purposes, and why would you rearrange the alphabet like that in the first place.)

heasm66 commented 3 months ago

Actually (to continue on this minor bug), if you do a frequency check on an english story (this example is Curses) , an alphabet like this is more economical:

Zcharacter
    "abcdefghi.klmnop,rstuvwTy'"
    "ABCDEFGHIJKLMNOPQRSxUVWjYZ"
    "0123456789qz!?*;>/[-:()";

Swapping in . for j, , for q, T for x and ' for z in the cheaper A0 (affects Object --> Ob.ect).

But... minor bug.