[ library(ic) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

get_domain_as_list(?Var, ?DomainList)

List of all the elements in the IC domain of Var
Var
An IC variable or a number
DomainList
The domain of Var as a list of elements.

Description

If Var is an integer IC variable, DomainList will be set to an ordered list containing each element in the domain of Var. If Var is a number, then DomainList will be set to a singleton list containing the number.

Currently, an out of range exception would be raised if Var is an IC variable of type real. This may change in the future.

Modes and Determinism

Fail Conditions

The initial value of DomainList fails to unify with the returned value.

Exceptions

(5) type error
Var is neither an IC variable or number.
(6) out of range
Var is a IC variable of type real.

See Also

get_domain / 2, get_bounds / 3