/** Warning messages **/

/*K: Warning */
/*A: J Gottschalk */
/*S: University of Western Australia */
/*D: November 1984 */

/*: SymbWT[$exp]
	returns the value of $exp if it can be evaluated, 
	where $exp is a logical operation. If $exp can not 
	be evaluated a warning message is printed,
	SymbWT returns the value 1 and $exp is set equal to one. */
SymbWT[$z] :: If[Numbp[$z],$z,Prh["I will assume until told otherwise",\
							      $z];$z:1;1]

/*: SymbWF[$exp]
	returns the value of $exp if it can be evaluated, 
	where $exp is a logical operation. If $exp can not 
	be evaluated a warning message is printed,
	SymbWF returns the value 0 and $exp is set equal to zero. */
SymbWF[$z] :: If[Numbp[$z],$z,Pr[Fmt[,"I will assume until told otherwise ~(",\
							      $z,")"]];$z:0;0]

/*: SymbT[$exp]
	returns the value of $exp if it can be evaluated, 
	where $exp is a logical operation. If $exp can not 
	be evaluated a warning message is printed and 
	SymbT returns he value 1. */ 
SymbT[$z] :: If[Numbp[$z],$z,Prh["I will assume", $z];1]

/*: SymbF[$exp]
	returns the value of $exp if it can be evaluated, 
	where $exp is a logical operation. If $exp can not 
	be evaluated a warning message is printed and SymbF 
	returns the value 0. */ 
SymbF[$z] :: If[Numbp[$z],$z,Pr[Fmt[,"I will assume  ~(",$z,")"]];0]

_XWarning[Loaded] : 1

/*E:
#I[1]::  <XWarning

#I[2]::  x>3

#O[2]:   x > 3

#I[3]::  SymbT[x>3]

I will assume   x > 3

#O[3]:   1

#I[4]::  x>3

#O[4]:   x > 3

#I[5]::  SymbWT[x>3]

I will assume until told otherwise      x > 3

#O[5]:   1

#I[6]::  x>3

#O[6]:   1

#I[7]::  SymbWF[d=0]

I will assume until told otherwise ~(d = 0)

#O[7]:   0
*/
