Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing infix.h

InfixDescribeWatchSub (lines 853-896)

0853  [ InfixDescribeWatchSub x y z s flag aflag;
0854    print "; The Infix ~;watch~ verb allows you to set a watch on any named
0855        routine(s) or objects: for instance ~;watch ScoreSub~ or
0856        ~;watch silver bars~. You can also:
0857        ^    ~;watch objects~: changes to attribute or property settings";
0858    if (debug_flag & 8) print " (on)"; else print " (off)";
0859   
0860        print ";^    ~;watch timers~: the running of timers and daemons each turn";
0861    if (debug_flag & 4) print " (on)"; else print " (off)";
0862   
0863        print ";^    ~;watch messages~: all messages sent";
0864    if (debug_flag & 1) print " (on)"; else print " (off)";
0865   
0866        print ";^    ~;watch actions~: all actions generated";
0867    if (debug_flag & 2) print " (on)"; else print " (off)";
0868   
0869        print ".^~~;watch~ can be abbreviated to ~;w~ and use ~off~ to stop
0870        watching: for instance ~;w location off~.^";
0871    aflag = debug_flag;
0872    objectloop (x has infix__watching) flag = true; aflag = aflag || flag;
0873    if (flag) print "The following objects are currently being watched: ";
0874    flag = false;
0875    objectloop (x has infix__watching)
0876    {   if (flag) print ", "; flag = true;
0877        print (name) x, " (", x, ")";
0878    }
0879    if (flag) new_line;
0880    s = (#highest_routine_number - #lowest_routine_number);
0881    if (s%8 == 0) s=s/8; else s=s/8+1;
0882    for (flag=false, x=0:x<s:x++) if (#routine_flags_array->x) flag = true;
0883    aflag = aflag || flag;
0884    if (flag) print "The following routines are currently being watched: ";
0885    for (x=0, flag=false:x<s:x++)
0886    {   for (y=1,z=0:y<256:z++,y=y*2)
0887        {   if ((#routine_flags_array->x) & y)
0888            {   if (flag) print ", "; flag = true;
0889                print (InfixPrintRoutine)
0890                    #lowest_routine_number + x*8 + z;
0891            }
0892        }
0893    }
0894    if (flag) new_line;
0895    if (aflag == false) "At present, nothing is being watched.";
0896  ];


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.