$monitor is not printing the all value changes when class variable is used inside the system task

In reply to Naven8:

First of all vcs is not allowing me to monitor dynamic variables. Which tool you are using? (I am not sure how monitor will behave when object is not created.)

In your first attempt you are creating object multiple times but randomizing only once.


// begin-end is missing after repeat
repeat(10) 
s1=new;
s1.randomize();

2nd time also the same thing happening(missing begin-end).

repeat(10) 
#10;
s1=new;
s1.randomize();
end