<ulclass="crumbs"><li><ahref="../webs.html">★</a></li><li><ahref="index.html">inter 1</a></li><li><ahref="index.html#P">Preliminaries</a></li><li><b>Inform Organisation</b></li></ul><pclass="purpose">The standard hierarchy of inter code generated by Inform.</p>
<ulclass="toc"><li><ahref="#SP1">§1. Status</a></li><li><ahref="#SP2">§2. Global area and main</a></li><li><ahref="#SP3">§3. Compilation modules</a></li><li><ahref="#SP5">§5. Function packages</a></li></ul><hrclass="tocbar">
<pclass="inwebparagraph"><aid="SP1"></a><b>§1. Status. </b>The Inter specification allows great flexibility in how packages are used
to structure a program, and requires very little.
</p>
<pclass="inwebparagraph">The Inform compiler, however, uses this flexibility in a systematic way,
as follows.
</p>
<pclass="inwebparagraph"><aid="SP2"></a><b>§2. Global area and main. </b>Inform opens with a version number, then declares package types (as needed
below), issues pragmas for I6 compiler memory settings, then declares
primitives for the standard Inform set: it always declares the same set
<pclass="inwebparagraph">As required, the rest of the program is in the <codeclass="display"><spanclass="extract">main</span></code> package, which has
type <codeclass="display"><spanclass="extract">_plain</span></code>.
one becomes an inter package of type <codeclass="display"><spanclass="extract">_module</span></code>, and is a subpackage of <codeclass="display"><spanclass="extract">main</span></code>.
<pclass="inwebparagraph"><aid="SP5"></a><b>§5. Function packages. </b>All functions compiled by Inform 7 are expressed in inter code by packages
of type <codeclass="display"><spanclass="extract">_function</span></code>. The only externally visible symbol is <codeclass="display"><spanclass="extract">call</span></code>, which is
<pclass="inwebparagraph">(Inform conventionally uses names ending in <codeclass="display"><spanclass="extract">_fn</span></code> for function packages.)
<pclass="inwebparagraph">The "shell" routine of code, the one receiving the <codeclass="display"><spanclass="extract">call</span></code>, creates a stack
fram and then calls the "kernel" routine, which does the actual work; when
that returns to the "shell", the stack frame is disposed of again.
</p>
<pclass="inwebparagraph">Function packages will also contain definitions of any static data they
need: for example, if an Inform 7 phrase contains a reference to the
constant <codeclass="display"><spanclass="extract">{ 1 , 2 , 3 }</span></code> then a function package for it will define a
constant with a name such as <codeclass="display"><spanclass="extract">block_constant_1</span></code>. In short, as far as
<ulclass="toc"><li><ahref="P-ia.html">Back to 'Inform Annotations'</a></li><li><ahref="P-pas.html">Continue with 'Pipelines and Stages'</a></li></ul><hrclass="tocbar">