The following example finds an integer vector with all numbers between 1 and 5.
F = [alldifferent(x), 1<=x<=5];
Since alldifferent is implemented using a big-M approach, it is crucial that all involved variables have explicit bound constraints. Additionally, it only makes sense to apply the operator on integer valued variables.
Applying alldifferent on a variable with n variables will introduce n(n-1)/2 binary variables.