Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing infix.h

InfixDescribeWatchSub (lines 904-947)

0904  [ InfixDescribeWatchSub x y z s flag aflag;
0905      print "; The Infix ~;watch~ verb allows you to set a watch on any named
0906          routine(s) or objects: for instance ~;watch ScoreSub~ or
0907          ~;watch silver bars~. You can also:
0908          ^    ~;watch objects~: changes to attribute or property settings";
0909      if (debug_flag & 8) print " (on)"; else print " (off)";
0910   
0911      print ";^    ~;watch timers~: the running of timers and daemons each turn";
0912      if (debug_flag & 4) print " (on)"; else print " (off)";
0913   
0914      print ";^    ~;watch messages~: all messages sent";
0915      if (debug_flag & 1) print " (on)"; else print " (off)";
0916   
0917      print ";^    ~;watch actions~: all actions generated";
0918      if (debug_flag & 2) print " (on)"; else print " (off)";
0919   
0920      print ".^~~;watch~ can be abbreviated to ~;w~ and use ~off~ to stop
0921          watching: for instance ~;w location off~.^";
0922      aflag = debug_flag;
0923      objectloop (x has infix__watching) flag = true; aflag = aflag || flag;
0924      if (flag) print "The following objects are currently being watched: ";
0925      flag = false;
0926      objectloop (x has infix__watching) {
0927          if (flag) print ", "; flag = true;
0928          print (name) x, " (", x, ")";
0929      }
0930      if (flag) new_line;
0931      s = (#highest_routine_number - #lowest_routine_number);
0932      if (s%8 == 0) s=s/8; else s=s/8+1;
0933      for (flag=false,x=0 : x<s : x++) if (#routine_flags_array->x) flag = true;
0934      aflag = aflag || flag;
0935      if (flag) print "The following routines are currently being watched: ";
0936      for (x=0,flag=false : x<s : x++) {
0937          for (y=1,z=0 : y<256 : z++,y=y*2) {
0938              if ((#routine_flags_array->x) & y) {
0939                  if (flag) print ", "; flag = true;
0940                  print (InfixPrintRoutine)
0941                      #lowest_routine_number + x*8 + z;
0942              }
0943          }
0944      }
0945      if (flag) new_line;
0946      if (aflag == false) "At present, nothing is being watched.";
0947  ];


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.