How to pass an array in verilog funcion

In reply to Srini @ CVCblr.com:

In reply to sambasiva:
Function with ref arguments shall be automatic - your function inside module is static by default.

thank you for educating on this. Learning is always a never-ending action.
module x;
integer x1;
function automatic func (ref integer a);
$display (“%p”, a);
endfunction

initial begin
  integer a [];
  a = {1,2,3,4,5};
  x1=func(a);
end

endmodule