Contents | Index | < Browse | Browse >

7.5.  Global Value Routines


$setg	( $setg	which val ) -> Returns val.  Sets  the	con-
	tents of (or the value of) variable which to be	val.

$global	( $global which	) -> Returns the contents of (or the
	value  of)  variable  which.   Equivalent to @which,
	with the exception that	 $global  allows  arithmetic
	expressions.

	Example:
		     Given:
			     VAR var[3];
			     (var + 0) = 10;
			     (var + 1) = 20;
			     (var + 2) = 30;

		     The statement
			     ($global ($plus var 2))
		     would return 30.



$verb	( $verb	) -> Returns the current  Verb.	  Equivalent
	to @Verb.

	Example:
		     (IF ($eq ($verb) take) THEN
			     ($say "You	can't take that!!n")
		     )



$dobj	( $dobj	) ->  Returns  the  current  direct  object.
	Equivalent to @Dobj.

	Example:
		     (IF ($eq ($dobj) ball) THEN
			     ($say "Dobj = balln")
		     )



$iobj	( $iobj	) -> Returns the  current  indirect  object.
	Equivalent to @Iobj.

	Example:
		     (IF ($eq ($iobj) basket) THEN
			     ($say "Iobj = basketn")
		     )



$prep	(  $prep  )  ->	 Returns  the  current	Preposition.
	Equivalent to @Prep.

	Example:
		     (IF ($eq ($prep) into) THEN
			     ($say "Prep = inton")
		     )



$conj	(  $conj  )  ->	 Returns  the  current	conjunction.
	Equivalent to @Conj.

	Example:
		     (IF ($eq ($conj) 1) THEN
			     ($say "The	conjunction was	'but'n")
		      ELSE
			     ($say "The	conjunction was	'and' or ','n")
		     )



$numd	( $numd	) ->  Returns  the  length  of	the  current
	direct object list.  Equivalent	to @Numd.

	Example:
		     (IF ($gt ($numd) 1) THEN
			     ($say "You	may not	use multiple direct objects!n")
		     )