Link all the page references to their correct places.
[ibg.git] / chapters / 15.rst
index 800455220fc40152d709dd73a274f6c18cb9f7bb..ad7d85fe80ebfef03d3389804f6ff600bb5fe86d 100644 (file)
@@ -108,7 +108,7 @@ alongside your lines if you wish, and will usually let you jump to a
 given line number. In this case, the error was caused by a semicolon 
 after the description string, instead of a comma:
 
-.. code-block:: inform6
+.. code-block:: inform
 
   Prop    "assorted stalls"
     with  name 'assorted' 'stalls',
@@ -156,19 +156,18 @@ well), and make whatever seems a sensible correction.
 
 .. rubric:: Warnings
 
-Warnings are not immediately catastrophic, but you should get rid of 
-them to ensure a good start at finding run-time mistakes (see "Debugging 
-your game" on page 197). You may declare a variable and then not use it; 
-you may mistake assignment and arithmetic operators (``=`` instead of 
-``==``); you may forget the comma that separates properties, etc. For 
-all these and many other warnings, Inform has found something which is 
-legal but doubtful.
+Warnings are not immediately catastrophic, but you should get rid of them
+to ensure a good start at finding run-time mistakes (see :doc:`16`). You
+may declare a variable and then not use it; you may mistake assignment and
+arithmetic operators (``=`` instead of ``==``); you may forget the comma
+that separates properties, etc. For all these and many other warnings,
+Inform has found something which is legal but doubtful.
 
 One common incident is to return in the middle of a statement block, 
 before the rest of statements can be reached. This is not always as 
 evident as it looks, for instance in a case like this:
 
-.. code-block:: inform6
+.. code-block:: inform
 
   if (steel_door has open) {
       print_ret "The breeze blows out your lit match.";
@@ -180,25 +179,23 @@ string has been printed, and the ``give match ~light`` line will never
 happen. Inform detects the fault and warns you. Probably the designer's 
 intention was:
 
-
 Compiling *à la carte*
 ======================
 
-
 One of the advantages of Inform is its portability between different 
 systems and machines. Specific usage of the compiler varies accordingly, 
 but some features should be in all environments. To obtain precise 
 information about any particular version, run the compiler with the 
-``-h1`` switch -- see "Switches" on page 193.
-
-Often the compiler is run with the name of your source file as its only 
-parameter. This tells the compiler to "read this file using Strict mode 
-and from it generate a Version 5 story file of the same name". The 
-source file is mostly full of statements which define how the game is to 
-behave at run-time, but will also include compile-time instructions 
-directed at the compiler itself (although such an instruction looks a 
-lot like a **statement**, it's actually quite different in what it does, 
-and is known as a **directive**). We have already seen the ``Include`` 
+``-h1`` switch -- see :ref:`switches`.
+
+Often the compiler is run with the name of your source file as its only
+parameter. This tells the compiler to "read this file using Strict mode and
+from it generate a Version 5 story file of the same name". The source file
+is mostly full of statements which define how the game is to behave at
+run-time, but will also include compile-time instructions directed at the
+compiler itself (although such an instruction looks a lot like a
+:term:`statement`, it's actually quite different in what it does, and is
+known as a :term:`directive`). We have already seen the ``Include``
 directive:
 
   :samp:`Include "{filename}";`
@@ -231,7 +228,7 @@ technique is then to divide it into a number of sections, each stored in
 a separate file, which you Include into a short master game file. For 
 example:
 
-.. code-block:: inform6
+.. code-block:: inform
 
   !============================================================================
   Constant Story "War and Peace";
@@ -254,6 +251,7 @@ example:
 
   !============================================================================
 
+.. _switches:
 
 Switches
 ========
@@ -299,7 +297,7 @@ Debug mode off (just remove the ``-D``) when you release your game to
 the public. This is fortunately very easy to check, since the game 
 banner ends with the letter "D" if the game was compiled in Debug mode:
 
-.. code-block:: inform6
+.. code-block:: transcript
 
   Captain Fate
   A simple Inform example
@@ -310,13 +308,11 @@ Switches are case sensitive, so you get different effects from ``-x``
 and ``-X``. Some of the more useful switches are:
 
 :samp:`-~S`
-
   Set compiler Strict mode off. This deactivates some additional error 
   checking features when it reads your source file. Strict mode is on by 
   default.
 
 :samp:`-v5 -v8`
-
   Compile to this version of story file. Versions 5 (on by default) and 
   8 are the only ones you should ever care about; they produce, 
   respectively, story files with the extensions .z5 and .z8 . Version 5 
@@ -327,24 +323,20 @@ and ``-X``. Some of the more useful switches are:
   similar to Version 5 but allows a 512 Kbytes file size.
 
 :samp:`-D -X`
-
   Include respectively the debugging verbs and the Infix debugger in the 
-  story file (see "Debugging your game" on page 197).
+  story file (see :doc:`16`).
 
 :samp:`-h1 -h2`
-
   Display help information about the compiler. ``-h1`` produces 
   information about file naming, and ``-h2`` about the available 
   switches.
 
 :samp:`-n -j`
-
   ``-n`` displays the number of declared attributes, properties and 
   actions. ``-j`` lists objects as they are being read and constructed 
   in the story file.
 
 :samp:`-s`
-
   Offer game statistics. This provides a lot of information about your 
   game, including the number of objects, verbs, dictionary entries, 
   memory usage, etc., while at the same time indicating the maximum 
@@ -352,7 +344,6 @@ and ``-X``. Some of the more useful switches are:
   nearing the limits of Inform.
 
 :samp:`-r`
-
   Record all the text of the game into a temporary file, useful to check 
   all your descriptions and messages by running them through a spelling 
   checker.