Inform 7 Home Page / Documentation
§27.22. Inform 6 variables, properties, actions, and attributes
I7's variables are usually compiled as entries in an array rather than as I6 variables. However, we can instead tell Inform to use an existing I6 variable (either one that we declare ourselves, or one in the I6 template layer). For example:
Room description style is a kind of value. The room description styles are Brief, Verbose and Superbrief.
The current room description style is a room description style that varies.
The current room description style variable translates into I6 as "lookmode".
This is a feature provided to help I7 source text to use variables internal to the I6 template code. It can, if really necessary, also be used to give I7 names to entirely new I6-level variables, created like so:
Include (- Global my_variable = 0; -).
This style of hybrid coding is really not encouraged.
I7's properties are compiled sometimes as I6 properties, sometimes as I6 attributes, sometimes as bits in a bitmap somewhere. However, we can override I7 by telling it that one of its property names is equivalent to an already-existing I6 property or attribute: if so then I7 will use that name and will not compile any directive to create it. For example:
The switched on property translates into I6 as "on".
The initial appearance property translates into I6 as "initial".
We do not need to translate "switched off", the opposite to "switched on": I7 will now compile this to "~on".
Lastly, actions can also be translated (though it's usually better to translate their rules instead and invent new I7 actions covering them):
The unlocking it with action translates into I6 as "Unlock".