Next:  Term Comparison Built-ins
Up:  The Built-in Predicates 
 Previous:  Internal Indexed Database 
 
 
 The following built-ins provide type testing in  ECLiPSe
 .
 ECLiPSe
  Type Testing built-in.
-  atom(?Atom)
 -  
 
Succeeds if  Atom is a Prolog atom.
 
 -  atomic(?Atomicterm)
 -  
 
Succeeds if  Atomicterm is an atom, a number, or a string.
 
 -  compound(?Term)
 -  
 
Succeeds if  Term is of type compound, i.e. a structure or a list.
 
 -  free(?Var)
 -  
 
Succeeds if  Var is a free variable, not a metaterm.
 
 -  get_var_info(?Var, ?InfoName, ?Value)
 -  
 
Succeeds if  Var is an uninstantiated variable,  InfoName is a valid information name and the information value  Value unifies with the value of the information. 
 
 -  integer(?Integer)
 -  
 
Succeeds if  Integer is an integer number.
 
 -  is_suspension(?Term)
 -  
 
Succeeds if  Term is a sleeping suspension.
 
 -  meta(?Var)
 -  
 
Succeeds if  Var is a metaterm.
 
 -  nonground(?VarTerm)
 -  
 
Succeeds if  VarTerm is not ground.
 
 -  nonvar(?Term)
 -  
 
Succeeds if  Term is instantiated.
 
 -  number(?Number)
 -  
 
Succeeds if  Number is a number.
 
 -  rational(?Rational)
 -  
 
Succeeds if  Rational is a rational number.
 
 -  real(?Real)
 -  
 
Succeeds if  Real is a real number.
 
 -  string(?String)
 -  
 
Succeeds if  String is a string.
 
 -  type_of(?Term, ?Type)
 -  
 
Succeeds if  Type is the data type of the term  Term.
 
 -  var(?Var)
 -  
 
Succeeds if  Var is a variable or a metaterm.
 
 
 
 
   
   
      
   
 Next:  Term Comparison Built-ins
Up:  The Built-in Predicates 
 Previous:  Internal Indexed Database 
 
 
 
Micha Meier 
Mon Mar  4 12:11:45 MET 1996