Subject: [sv-ec] Example of argument evaluation order
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Mon Feb 03 2003 - 13:26:09 PST
Below is a complete example of a situation where evaluation
order may change the result due to side effects.
Arturo
----------------
module test;
integer i, j;
function integer f;
input a;
integer a;
begin
i = i + 1;
f = a;
end
endfunction
function integer g;
input a;
integer a;
begin
j = j + 1;
g = a;
end
endfunction
initial begin
i = 0;
j = 0;
#1;
$display(i, f(j), g(0));
end
This archive was generated by hypermail 2b28 : Mon Feb 03 2003 - 13:25:09 PST