For functions, we can use pass by name as below:
function void xyz(string x,int y);
$display(x,,y);
endfunction
initial begin
xyz(.x("Hi"),.y(2));
end
Now, I have a macro like below:
`define XYZ(name,number) \
int num; \
num=number; \
$display("%s %d",``name``,num);
It is invoked as XYZ(hi,2)
. I would like to know how I can use pass by name in macros just as we do for functions.