How to get values of different bins of a coverpoint?

In reply to dave_59:

@dave_59 : Yes this is very easy solution, compared to my logic.

But does it work for variables. Like suppose, I require bins as below:

bins range[3] = {[32’h1 : config.num_of_ns]};

Now the value of this variable, may get changed before every sampling of the coverpoint.

So will the range get divided accordingly?