Randomization inside value list

Hi,

Is there any way to randomize inside value list.
For example, let’s randomize inside {1,3,5,11} possibile values.
the constraint will be:

rand rand_var;
c0 {rand_var inside {1,3,5,11};}

What if I want to pass the value list?
I tried with this, but it fails:

int val_list[] = '{4,6,8,10};
c0 {rand_var inside {val_list};}

In reply to alexkidd84:

Using ‘val_list’ inside a constraint works for me. Make sure that you declare ‘rand_var’ as ‘rand int rand_var’, otherwise you will get a single bit variable.

If it still doesn’t work for you, you will need to post a complete example that demonstrates your failure.