M
Martin Vass
Guest
This code compiles without errors on 2 simulators and produces the
output "a[2] is 1".
What's going on? Shouldn't this be flagged as a syntax error?
TIA
-MV
------
module top;
initial
test;
task test;
integer a;
begin
a[0] = 1;
a[1] = 2;
a[2] = 3;
$display("a[2] is %d", a[2]);
end
endtask
endmodule
output "a[2] is 1".
What's going on? Shouldn't this be flagged as a syntax error?
TIA
-MV
------
module top;
initial
test;
task test;
integer a;
begin
a[0] = 1;
a[1] = 2;
a[2] = 3;
$display("a[2] is %d", a[2]);
end
endtask
endmodule