[ library(ic) | Reference Manual | Alphabetic Index ]

is_in_domain(++Val, ?Var, -Result)

Binds Result to indicate presence of Val in domain of Var
A number
An IC variable or a number
An atom


Low level predicate which succeeds when Val is in the domain of Var with Result bound to the atom 'yes'. When Val is not in the domain of Var, the predicate succeeds binding Result to the atom 'no'. Should the result be undecidable (as can be the case with bounded reals), the predicate will succeed binding Result to the atom 'maybe'. If Var is a number, this predicate will succeed with Result bound to 'yes' iff Var $= Val would succeed WITHOUT leaving a delayed goal. If Var $= Val would have left a delayed goal then Result gets bound to 'maybe'.

Modes and Determinism


(4) instantiation fault
Val is not ground
(5) type error
either Val or Var is not a numeric type

See Also

is_in_domain / 2