X-Git-Url: https://jxself.org/git/?p=ibg.git;a=blobdiff_plain;f=chapters%2F09.rst;h=448a1525a0e6677d0386d7334d5f4022f0547c0e;hp=67f7aa5cf729770694f2f95b5ffc02c63cc9dc1a;hb=f9eb50b5024de49b2df4b5daab471731840195d3;hpb=a94081289bc21041a8daac44d8c8b6714a831281 diff --git a/chapters/09.rst b/chapters/09.rst index 67f7aa5..448a152 100644 --- a/chapters/09.rst +++ b/chapters/09.rst @@ -158,7 +158,7 @@ of the variable -- ``self`` or ``location`` -- which is being checked. A better approach might be to rework our ``BeenHereBefore`` routine so that it does both jobs, but we somehow need to tell it which variable's value is to be checked. That's easy: we design the routine so that it expects an -**argument**:: +:term:`argument`:: [ BeenToBefore this_room; if (this_room has visited) return true; @@ -180,7 +180,7 @@ routine doesn't care where the argument came from; it just sees a value which it knows as ``this_room``, and which it then uses to test for the ``visited`` attribute. On the second line we supply ``location`` as the argument, but the routine just sees another value in its ``this_room`` -variable. ``this_room`` is called a **local variable** of the +variable. ``this_room`` is called a :term:`local variable` of the ``BeenToBefore`` routine, one that must be set to a suitable value each time that the routine is called. In this example routine, the value needs to be a room object; we could also check an explicit named room::