Previous Page | Next Page

The CLP Procedure

ALLDIFF Statement

ALLDIFF (variables) <...> ;
ALLDIFFERENT (variables) <...> ;

The ALLDIFF statement can have multiple specifications. Each specification defines a unique global constraint on a set of variables requiring all of them to be different from each other. A global constraint is equivalent to a conjunction of elementary constraints.

For example, the statements

   var (X1-X3) A B;
   alldiff (X1-X3) (A B);

are equivalent to


If the variable list is empty, the ALLDIFF constraint applies to all the variables declared in the VAR statement.

Note: This procedure is experimental.

Previous Page | Next Page | Top of Page