Dynamic array of features:
bit[7:0] d_array[];
d_array = new[4];
d_array ={0,1,2,3};
d_array = new[10];//原来的四个元素被清空
d_array = new[10](d_array);//原来的四个元素还存在
function void funcs();
int pos[$] ;
// 缩减操作 xor , or , and , xnor , sum , product 等
$display("the sum is %d ",array.sum());
$display("the and is %d ",array.and());
$display("the or is %d ",array.or() );
$display("the xor is %d ",array.xor());
$display("the product is %d ",array.product());//乘积
endfunction