Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

ScopeWithin (lines 3816-3842)

3816  !  ScopeWithin looks for objects in the domain which make textual sense
3817  !  and puts them in the match list.  (However, it does not recurse through
3818  !  the second argument.)
3819  ! ----------------------------------------------------------------------------
3820   
3821  [ ScopeWithin domain nosearch context x y;
3822      if (domain == 0) rtrue;
3823   
3824      ! Special rule: the directions (interpreted as the 12 walls of a room) are
3825      ! always in context.  (So, e.g., "examine north wall" is always legal.)
3826      ! (Unless we're parsing something like "all", because it would just slow
3827      ! things down then, or unless the context is "creature".)
3828   
3829      if (indef_mode==0 && domain==actors_location
3830          && scope_reason==PARSING_REASON && context~=CREATURE_TOKEN)
3831              ScopeWithin(compass);
3832   
3833      ! Look through the objects in the domain, avoiding "objectloop" in case
3834      ! movements occur, e.g. when trying each_turn.
3835   
3836      x = child(domain);
3837      while (x ~= 0) {
3838          y = sibling(x);
3839          ScopeWithin_O(x, nosearch, context);
3840          x = y;
3841      }
3842  ];


Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.