[eclipse-clp-users] How to expand domain of a variable

From: Sergey Dymchenko <kit1980_at_...6...>
Date: Fri, 4 Nov 2011 02:38:32 +0200
Hello!

How to expand existing domain of a variable?
I mean, I have a variable with some domain (say, 1..10), and I want to
allow that variable to have values from that domain or from another
domain, like 20..30.

I tried things like
N :: [1..10], get_domain(N, D), N :: D or N :: [20..30].
but unsurprisingly it doesn't work.

Of course I can write just
N :: [1..10] or N :: [20..30].
but I want to add ranges to domain iteratively (in a cycle).

Sergey.
Received on Fri Nov 04 2011 - 00:38:42 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST