Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

ShowobjSub (lines 4319-4372)

4319  [ ShowobjSub c f l a n x;
4320     if (noun==0) noun=location;
4321     objectloop (c ofclass Class) if (noun ofclass c) { f++; l=c; }
4322     if (f == 1) print (name) l, " ~"; else print "Object ~";
4323     print (name) noun, "~ (", noun, ")";
4324     if (parent(noun)~=0) print " in ~", (name) parent(noun), "~";
4325     new_line;
4326     if (f > 1)
4327     {   print "  class ";
4328         objectloop (c ofclass Class) if (noun ofclass c) print (name) c, " ";
4329         new_line;
4330     }
4331     for (a=0,f=0:a<48:a++) if (noun has a) f=1;
4332     if (f)
4333     {   print "  has ";
4334         for (a=0:a<48:a++) if (noun has a) print (DebugAttribute) a, " ";
4335         new_line;
4336     }
4337     if (noun ofclass Class) return;
4338   
4339     f=0; l = #identifiers_table-->0;
4340     for (a=1:a<=l:a++)
4341     {   if ((a~=2 or 3) && noun.&a)
4342         {   if (f==0) { print "  with "; f=1; }
4343             print (property) a;
4344             n = noun.#a;
4345             for (c=0:2*c<n:c++)
4346             {   print " ";
4347                 x = (noun.&a)-->c;
4348                 if (a==name) print "'", (address) x, "'";
4349                 else
4350                 {   if (a==number or capacity or time_left)
4351                         print x;
4352                     else
4353                     {   switch(x)
4354                         {   NULL: print "NULL";
4355                             0: print "0";
4356                             1: print "1";
4357                             default:
4358                             switch(metaclass(x))
4359                             {   Class, Object: print (name) x;
4360                                 String: print "~", (string) x, "~";
4361                                 Routine: print "[...]";
4362                             }
4363                             print " (", x, ")";
4364                         }
4365                     }
4366                 }
4367             }
4368             print ",^       ";
4369         }
4370     }
4371  !   if (f==1) new_line;
4372  ];


Last updated 27 February 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.