From 0712d22a6805b9115d7988281b074f7462e38e3e Mon Sep 17 00:00:00 2001 From: Glenn Hutchings Date: Mon, 18 Apr 2016 21:24:05 +0100 Subject: [PATCH] Fix up italic-courier typefaces in chapter 13. --- chapters/13.rst | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/chapters/13.rst b/chapters/13.rst index 914c5cb..3eb00a7 100644 --- a/chapters/13.rst +++ b/chapters/13.rst @@ -539,33 +539,23 @@ need to specify the toilet, because we want this rule to apply to all dark rooms (well, the only dark room in the game *is* the toilet, but we are trying to provide a general rule). -.. todo:: + :samp:`objectloop (variable) {statement};` - Lots of italicized typewriter stuff here... +is a loop statement, one of the four defined in Inform. A loop statement is +a construct that allows you to run several times through a statement (or a +statement block). ``objectloop`` performs the :samp:`{statement}` once for +every object defined in the (``variable``) . If we were to code: -.. code-block:: inform6 - - objectloop (variable) statement; - -is a loop statement, one of the four defined in Inform. A loop statement -is a construct that allows you to run several times through a statement -(or a statement block). ``objectloop`` performs the ``statement`` once -for every object defined in the (``variable``) . If we were to code: - -.. code-block:: inform6 - - objectloop (item) statement; + :samp:`objectloop (item) {statement};` -then the ``statement`` would be executed once for each object in the -game. However, we want to perform the statement only for those objects -whose parent object is the same as the player's parent object: that is, -for objects in the same room as the player, so we instead code: - -.. code-block:: inform6 +then the :samp:`{statement}` would be executed once for each object in the +game. However, we want to perform the statement only for those objects +whose parent object is the same as the player's parent object: that is, for +objects in the same room as the player, so we instead code: - objectloop (item in parent(player)) statement; + :samp:`objectloop (item in parent(player)) {statement};` -What is the actual ``statement`` that we'll repeatedly execute? +What is the actual :samp:`{statement}` that we'll repeatedly execute? .. code-block:: inform6 -- 2.31.1