以两个例子说明参数化的类及声明静态变量时的情况:
eg:
program param_stack;
class stack #(type T = int);
int m_cnt;
static int counter = 2;
function new;
m_cnt = counter++;
endfunction: new
endclass: stack
class stacked extends stack #(real);
endclass: stacked
typedef stack #(byte) stack_byte;
typedef stack #() stact_int;
stack_byte S1 = new();