Dist problem

Hi ALL,
I have var rand x, which have distribution with different weight.
x dist{range[i]:=weight[i]} ,range and weight are array. How can I do it using foreach ?
Thanks a lot!!

In reply to peter:

https://verificationacademy.com/forums/systemverilog/can-i-use-dynamic-array-set-distribution

In reply to dave_59:

Hi Dave,

can you post a working example?