Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

Refers (lines 4080-4106)

4080  !  Refers works out whether the word at number wnum can refer to the object
4081  !  obj, returning true or false.  The standard method is to see if the
4082  !  word is listed under "name" for the object, but this is more complex
4083  !  in languages other than English.
4084  ! ----------------------------------------------------------------------------
4085   
4086  [ Refers obj wnum   wd k l m;
4087      if (obj == 0) rfalse;
4088   
4089      #Ifdef LanguageRefers;
4090      k = LanguageRefers(obj,wnum); if (k >= 0) return k;
4091      #Endif; ! LanguageRefers
4092   
4093      k = wn; wn = wnum; wd = NextWordStopped(); wn = k;
4094   
4095      if (parser_inflection >= 256) {
4096          k = indirect(parser_inflection, obj, wd);
4097          if (k >= 0) return k;
4098          m = -k;
4099      }
4100      else
4101          m = parser_inflection;
4102      k = obj.&m; l = (obj.#m)/WORDSIZE-1;
4103      for (m=0 : m<=l : m++)
4104          if (wd == k-->m) rtrue;
4105      rfalse;
4106  ];


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.