Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

ShowobjSub (lines 5380-5447)

5380  #Endif; ! TARGET_
5381   
5382  [ ShowobjSub c f l a n x numattr;
5383      if (noun == 0) noun = location;
5384      objectloop (c ofclass Class) if (noun ofclass c) { f++; l=c; }
5385      if (f == 1) print (name) l, " ~"; else print "Object ~";
5386      print (name) noun, "~ (", noun, ")";
5387      if (parent(noun) ~= 0) print " in ~", (name) parent(noun), "~";
5388      new_line;
5389      if (f > 1) {
5390          print "  class ";
5391          objectloop (c ofclass Class) if (noun ofclass c) print (name) c, " ";
5392          new_line;
5393      }
5394      #Ifdef TARGET_ZCODE;
5395      numattr = 48;
5396      #Ifnot; ! TARGET_GLULX
5397      numattr = NUM_ATTR_BYTES * 8;
5398      #Endif; ! TARGET_
5399      for (a=0,f=0 : a<numattr : a++) if (noun has a) f=1;
5400      if (f) {
5401          print "  has ";
5402          for (a=0 : a<numattr : a++) if (noun has a) print (DebugAttribute) a, " ";
5403          new_line;
5404      }
5405      if (noun ofclass Class) return;
5406   
5407      f=0;
5408      #Ifdef TARGET_ZCODE;
5409      l = #identifiers_table-->0;
5410      #Ifnot; ! TARGET_GLULX
5411      l = INDIV_PROP_START + #identifiers_table-->3;
5412      #Endif; ! TARGET_
5413      for (a=1 : a<=l : a++) {
5414          if ((a ~= 2 or 3) && noun.&a) {
5415              if (f == 0) { print "  with "; f=1; }
5416              print (property) a;
5417              n = noun.#a;
5418              for (c=0 : WORDSIZE*c<n : c++) {
5419                  print " ";
5420                  x = (noun.&a)-->c;
5421                  if (a == name) print "'", (address) x, "'";
5422                  else {
5423                      if (a == number or capacity or time_left) print x;
5424                      else {
5425                          switch (x) {
5426                            NULL: print "NULL";
5427                            0:    print "0";
5428                            1:    print "1";
5429                            default:
5430                              switch (metaclass(x)) {
5431                                Class, Object:
5432                                  print (name) x;
5433                                String:
5434                                  print "~", (string) x, "~";
5435                                Routine:
5436                                  print "[...]";
5437                             }
5438                             print " (", x, ")";
5439                          }
5440                      }
5441                  }
5442              }
5443              print ",^       ";
5444          }
5445      }
5446  !   if (f==1) new_line;
5447  ];


Last updated 27 February 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson assisted by C Knight.