title: what is the difference between automatic and static task,why we cant pass by reference to a static task
body: <p>What is the difference between the static and automatic tasks.</p>
  
  <pre><code>program class_ref;
    int index,value;
  
   class holding_values;
     int ass_array[*];
     task assign_value (int value,int index);
         ass_array[index] = value;
     endtask 
  
     function void disp(int index);
         $display("%t  %M:ASSOSIATIVA VALUE%d ",$time,ass_array[index]);
     endfunction
  
  endclass
  
  initial begin
      holding_values  obc;
      index =5;
      value =88;
      obc = new();
      map(obc,value);
      obc.disp(index);
  end
  
  
  task map(ref holding_values obc,ref int value );
      value +=5;
      obc.assign_value(value,index);
      obc =null;
  endtask
  
  endprogram
  </code></pre>
  
  <p>if this code is executed it will give the error  </p>
  
  <blockquote>
    <p>reference argument is illegal inside static task-function declaration</p>
  </blockquote>
  
  <p>if task "map" is made to automatic the program runs.</p>
  
  <p>Why do we need to make task automatic? What is the difference between static and automatic tasks?</p>