Contents | Index | < Browse | Browse >

10.2.  Constants

     For convenience and readability,  standard.adl  defines
     the following constants:

		  TRUE	= 1;
		  FALSE	= 0;
		  NULL	= 0;


     In	addition, the following	constants  are	defined	 for
     use as arguments to the $spec routine:

		  DEBUG	= 1;
		  RESTART = 2;
		  QUIT = 3;
		  SAVE = 4;
		  RESTORE = 5;
		  EXEC = 6;
		  PRESERVE = 7;
		  SCRIPT = 8;
		  HEADER = 9;
		  MARGIN = 10;


     The following constants are defined for  use  as  argu-
     ments  to	the  Expect  routine  (described  in section
     10.6):

		  NO_OBJ = 1;
		  ONE_OBJ = 2;
		  MULT_OBJ = 4;
		  PLAIN_OBJ = 8;
		  STR_OBJ = 16;


     The  following  global  variables	 are   declared	  by
     standard.adl for use by the ADL programmer:

		  Skip,
		  Indent,
		  Dark,
		  MyLoc,
		  Verbose,
		  Scripting,
		  LastVerb,
		  LastNumd,
		  LastDobj,
		  LastPrep,
		  LastIobj;

     The above globals are used	as follows:

     Skip	   Skip	is used	in preference to  ($exit  1)
		   or  ($exit 2) inside	Object ACTIONs if it
		   is desired that the rest  of	 the  Object
		   list	 be  processed by the Verb ACTION of
		   "take" or "drop" (see the  discussion  on
		   TakeAct and DropAct below).

     Indent	   Indent should be set	to  TRUE  if  object
		   descriptions	 are  to  be indented by two
		   spaces before being printed.

     Dark	   Dark	is TRUE	if  it	is  currently  dark.
		   This	 variable  is set by the Looker	rou-
		   tine	if there is no light in	the  current
		   location  of	 .ME, and may also be set as
		   the result of some other action.

     MyLoc	   MyLoc is the	location of  the  player  at
		   the	outset	of  the	 previous turn.	 The
		   routine  Looker  checks  to	see  whether
		   MyLoc  is the same as the location of the
		   player.  If so, the room  description  is
		   printed.   If not, no action	is performed
		   by Looker.  MyLoc is	initialized to -1 to
		   force  the printing of a room description
		   at the beginning of the game.

     Verbose	   Verbose should be  set  to  TRUE  if	 the
		   player  wishes that all room	descriptions
		   be verbose ones (i.e.  long	descriptions
		   of  the  room and its contents).  If	Ver-
		   bose	is  false  and	the  room  has	been
		   visited  previously,	 a short description
		   will	be printed.

     Scripting	   Scripting is	set to TRUE by the ACTION of
		   the	Verb  "script"	when output is being
		   scripted to a file.	It is  FALSE  other-
		   wise.

     LastVerb	   LastVerb, LastNumd,	LastDobj,  LastPrep,
		   and	LastIobj  contain the values present
		   in the sentence prior to the	current	sen-
		   tence.  These values	are set	in the stan-
		   dard	  looking   daemon.    The   routine
		   SaveSentence	 is  provided  for this	pur-
		   pose.