contains
| contains | 
  Purpose
 
 
 Returns
 true if the value 'val' belongs to the domain of the variable passed in argument
 
 
  Synopsis
 
 function contains(x:cpvar,val:integer) : boolean
 function contains(x:cpfloatvar,val:real) : boolean
 
  Arguments
 
 | 
     x 
     | 
     the decision variable
     | 
| 
     val 
     | 
     the value
     | 
  Return value
 
 
 true if x can be instantiated to
 val
 
  Example
 
 
 The following example shows how to test if a value belongs to the domain of a cpvar
 x
 
 if contains(x,3) then
  write("x can be instantiated to three!")
end-if
  Related topics
 
  
