Access to class variables

In reply to cgales:

As Dave said, the following works and it makes sense since
this is an event-based simulator. Without a variable argument, the function is never called again.
The function is a function; it just resides there until called.


  function int get_value(int v);
		return v;
	endfunction
endclass
 
module	sim_top;
 
	myclass mc = new();
 
	initial begin
 
		fork		//fork A
			mc.value_inc();
          wait(mc.get_value(mc.value)==10) #1;
		join_any
		disable fork;