home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e032 / 3.ddi / FILES / PRELOAD.PAK / VALUEQ.M < prev   
Encoding:
Text File  |  1992-07-29  |  350 b   |  19 lines

  1.  
  2. (*
  3.  * Test if a value has been defined for an expression.
  4.  *)
  5.  
  6. Begin["System`"]
  7.  
  8. ValueQ::usage = "ValueQ[expr] gives True if a value has been defined for expr, and gives False otherwise."
  9.  
  10. Begin["`Private`"]
  11.  
  12. Attributes[ValueQ] = {HoldAll}
  13.  
  14. ValueQ[expr_] := ! SameQ[Hold[Evaluate[expr]], Hold[expr]]
  15.  
  16. Protect[ValueQ]
  17. End[ ]
  18. End[ ]
  19.