<pclass="purpose">This is the superstructure of the file of I6 code output by Inform: from ICL commands at the top down to the signing-off comments at the bottom.</p>
<ulclass="toc"><li><ahref="S-msc.html#SP1">§1. ICL Commands</a></li><li><ahref="S-msc.html#SP2">§2. Identification</a></li><li><ahref="S-msc.html#SP3">§3. Constants</a></li><li><ahref="S-msc.html#SP4">§4. Global Variables</a></li><li><ahref="S-msc.html#SP5">§5. Compass</a></li><li><ahref="S-msc.html#SP6">§6. Score and Rankings Table</a></li><li><ahref="S-msc.html#SP7">§7. The Old Library</a></li><li><ahref="S-msc.html#SP8">§8. Parser</a></li><li><ahref="S-msc.html#SP9">§9. Order of Play</a></li><li><ahref="S-msc.html#SP10">§10. Activities</a></li><li><ahref="S-msc.html#SP11">§11. Object Tree</a></li><li><ahref="S-msc.html#SP12">§12. Tables</a></li><li><ahref="S-msc.html#SP13">§13. Equations</a></li><li><ahref="S-msc.html#SP14">§14. Actions</a></li><li><ahref="S-msc.html#SP15">§15. Phrases</a></li><li><ahref="S-msc.html#SP16">§16. Rulebooks</a></li><li><ahref="S-msc.html#SP17">§17. Scenes</a></li><li><ahref="S-msc.html#SP18">§18. The New Library</a></li><li><ahref="S-msc.html#SP19">§19. Parsing Tokens</a></li><li><ahref="S-msc.html#SP20">§20. Text generation</a></li><li><ahref="S-msc.html#SP21">§21. Testing commands</a></li><li><ahref="S-msc.html#SP22">§22. I6 Inclusions</a></li><li><ahref="S-msc.html#SP23">§23. Entries in constant lists</a></li><li><ahref="S-msc.html#SP24">§24. To Phrases</a></li><li><ahref="S-msc.html#SP25">§25. Chronology</a></li><li><ahref="S-msc.html#SP26">§26. Grammar</a></li><li><ahref="S-msc.html#SP27">§27. Deferred Propositions</a></li><li><ahref="S-msc.html#SP28">§28. Miscellaneous Loose Ends</a></li><li><ahref="S-msc.html#SP29">§29. Block Values</a></li></ul><hrclass="tocbar">
<pclass="commentary firstcommentary"><aid="SP1"class="paragraph-anchor"></a><b>§1. ICL Commands. </b>The Inform Control Language is a mini-language for controlling the I6 compiler,
<pclass="commentary firstcommentary"><aid="SP2"class="paragraph-anchor"></a><b>§2. Identification. </b>Both of the compiler and template layer, and of the story file to be produced.
<pclass="commentary firstcommentary"><aid="SP4"class="paragraph-anchor"></a><b>§4. Global Variables. </b>These are not the only global variables defined in the template layer:
used to produce the status line display (hence <spanclass="extract"><spanclass="extract-syntax">sline1</span></span> and <spanclass="extract"><spanclass="extract-syntax">sline2</span></span>).
(<spanclass="extract"><spanclass="extract-syntax">sline1</span></span> and <spanclass="extract"><spanclass="extract-syntax">sline2</span></span> are entirely unused on when we target Glulx.)
</li><li>(11) The <spanclass="extract"><spanclass="extract-syntax">move_*</span></span> variables are specific to the <spanclass="extract"><spanclass="extract-syntax">##Going</span></span> action.
</li><li>(12) These variables hold current settings for listing objects and,
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">location</span><spanclass="plain-syntax"> = </span><spanclass="identifier-syntax">InformLibrary</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">does not = I7 "location": see below</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">not_yet_in_play</span><spanclass="plain-syntax"> = </span><spanclass="reserved-syntax">true</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">set false when first command received</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">notify_mode</span><spanclass="plain-syntax"> = </span><spanclass="constant-syntax">1</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">score notification on or off</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">left_hand_status_line</span><spanclass="plain-syntax"> = </span><spanclass="identifier-syntax">T_SL_Location</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">= I7 "left hand status line"</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">right_hand_status_line</span><spanclass="plain-syntax"> = </span><spanclass="identifier-syntax">T_SL_Score_Moves</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">= I7 "right hand status line"</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">visibility_ceiling</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">highest object in tree visible to player</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">visibility_levels</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">distance in tree to that</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">SACK_OBJECT</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">current player's holdall item in use</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">actors_location</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">like real_location, but for the actor</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">meta</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">action is out of world</span>
<spanclass="reserved-syntax">Array</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">multiple_object</span><spanclass="plain-syntax"> --></span><spanclass="identifier-syntax">MATCH_LIST_WORDS</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">multiple-object list (I6 table array)</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">toomany_flag</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">multiple-object list overflowed</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">multiflag</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">multiple-object being processed</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">multiple_object_item</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">item currently being processed in multiple-object list</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">keep_silent</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">true if current action is being tried silently</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">etype</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">parser error number if command not recognised</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">special_word</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">dictionary address of first word in "[text]" token</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">consult_from</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">word number of start of "[text]" token</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">consult_words</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">number of words in "[text]" token</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">parsed_number</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">value from any token not an object</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">special_number1</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">first value, if token not an object</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">special_number2</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">second value, if token not an object</span>
<spanclass="reserved-syntax">Array</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">parser_results</span><spanclass="plain-syntax"> --></span><spanclass="constant-syntax">16</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">for parser to write its results in</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">parser_trace</span><spanclass="plain-syntax"> = </span><spanclass="constant-syntax">0</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">normally 0, but 1 to 5 traces parser workings</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">pronoun_word</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">records which pronoun ("it", "them", ...) caused an error</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">pronoun_obj</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">and what object it was thought to refer to</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">understand_as_mistake_number</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">which form of "Understand... as a mistake"</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">parser_action</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">written by the parser for the benefit of GPRs</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">parameters</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">number of I7 tokens parsed on the current line</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">action_to_be</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">(if the current line were accepted)</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">action_reversed</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">(parameters would be reversed in order)</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">wn</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">word number within "parse" buffer (from 1)</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">num_words</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">number of words in buffer</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">verb_word</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">dictionary address of command verb</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">verb_wordnum</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">word number of command verb</span>
<spanclass="comment-syntax">(10)</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">scope_reason</span><spanclass="plain-syntax"> = </span><spanclass="identifier-syntax">PARSING_REASON</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">current reason for searching scope</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">scope_stage</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">1, 2 then 3</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">advance_warning</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">what a later-named thing will be</span>
<spanclass="comment-syntax">Global reason_code = NULL; ! for the I6 veneer</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">lt_value</span><spanclass="plain-syntax"> = </span><spanclass="identifier-syntax">EMPTY_TEXT_VALUE</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">common value of list_together</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">listing_together</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">object number of one member of a group being listed together</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">listing_size</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">size of such a group</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">c_margin</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">current level of indentation printed by WriteListFrom()</span>
<spanclass="identifier-syntax">Global</span><spanclass="plain-syntax"></span><spanclass="identifier-syntax">inventory_stage</span><spanclass="plain-syntax"> = </span><spanclass="constant-syntax">1</span><spanclass="plain-syntax">; </span><spanclass="comment-syntax">1 or 2 according to the context in which list_together uses</span>
<pclass="commentary firstcommentary"><aid="SP5"class="paragraph-anchor"></a><b>§5. Compass. </b>I6 identified compass directions as being children of the pseudo-object
<spanclass="extract"><spanclass="extract-syntax">Compass</span></span>, so we define it. (Note that <spanclass="extract"><spanclass="extract-syntax">Compass</span></span> is not a valid I7 object,
<pclass="commentary firstcommentary"><aid="SP6"class="paragraph-anchor"></a><b>§6. Score and Rankings Table. </b>The following command tells Inform to compile constant definitions for <spanclass="extract"><spanclass="extract-syntax">INITIAL_MAX_SCORE</span></span>
and/or <spanclass="extract"><spanclass="extract-syntax">RANKING_TABLE</span></span>, in cases where there are scores and rankings. If there's
no ranking table, <spanclass="extract"><spanclass="extract-syntax">RANKING_TABLE</span></span> is left undefined, so that we can <spanclass="extract"><spanclass="extract-syntax">#ifdef</span></span> this
<pclass="commentary firstcommentary"><aid="SP7"class="paragraph-anchor"></a><b>§7. The Old Library. </b>The I6 library consisted essentially of the parser, the verb routines, and
<pclass="commentary firstcommentary"><aid="SP8"class="paragraph-anchor"></a><b>§8. Parser. </b>The largest single block of code in the traditional I6 library part of the
<pclass="commentary">The two pseudo-objects <spanclass="extract"><spanclass="extract-syntax">InformParser</span></span> and <spanclass="extract"><spanclass="extract-syntax">InformLibrary</span></span> are relics of the
<pclass="commentary firstcommentary"><aid="SP9"class="paragraph-anchor"></a><b>§9. Order of Play. </b>The <spanclass="extract"><spanclass="extract-syntax">Main</span></span> routine, where execution begins, and the primitive rules in the
<pclass="commentary firstcommentary"><aid="SP10"class="paragraph-anchor"></a><b>§10. Activities. </b>These are numbered upwards from 0 in order of creation. The following arrays
<pclass="commentary firstcommentary"><aid="SP11"class="paragraph-anchor"></a><b>§11. Object Tree. </b>The I6 object tree contains <spanclass="extract"><spanclass="extract-syntax">Class</span></span> definitions as well as objects, but
<pclass="commentary firstcommentary"><aid="SP12"class="paragraph-anchor"></a><b>§12. Tables. </b>The initial state of the I6 arrays corresponding to each I7 table: see
<pclass="commentary firstcommentary"><aid="SP16"class="paragraph-anchor"></a><b>§16. Rulebooks. </b>The literally hundreds of rulebooks are set up here. (In the end a rulebook
<pclass="commentary firstcommentary"><aid="SP18"class="paragraph-anchor"></a><b>§18. The New Library. </b>The gleaming, aluminium and glass extension to the library: almost all of it
<pclass="commentary firstcommentary"><aid="SP19"class="paragraph-anchor"></a><b>§19. Parsing Tokens. </b>GPRs, scope and noun filters to be used in grammar lines, but no actual
<pclass="commentary firstcommentary"><aid="SP22"class="paragraph-anchor"></a><b>§22. I6 Inclusions. </b>This paragraph contains no code, by default: it's a hook on which to hang
<pclass="commentary firstcommentary"><aid="SP23"class="paragraph-anchor"></a><b>§23. Entries in constant lists. </b>Well: most of them, anyway. In particular, all of those which are lists of
<pclass="commentary firstcommentary"><aid="SP24"class="paragraph-anchor"></a><b>§24. To Phrases. </b>We now compile all of the remaining code in the source text: the "To..."
<pclass="commentary firstcommentary"><aid="SP25"class="paragraph-anchor"></a><b>§25. Chronology. </b>Similarly, this is where we wrap up all references to past tenses: after this
<pclass="commentary firstcommentary"><aid="SP26"class="paragraph-anchor"></a><b>§26. Grammar. </b>This is the trickiest matter of timing. We had to leave the grammar lines
<pclass="commentary firstcommentary"><aid="SP27"class="paragraph-anchor"></a><b>§27. Deferred Propositions. </b>Most conditions, such as "the score is 10", and descriptions, such as
<pclass="commentary firstcommentary"><aid="SP28"class="paragraph-anchor"></a><b>§28. Miscellaneous Loose Ends. </b>And we still aren't done, because we still have:
<pclass="commentary firstcommentary"><aid="SP29"class="paragraph-anchor"></a><b>§29. Block Values. </b>These are values which are pointers to more elaborate data on the memory heap,