You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (int i = 0, j = 2; i < $size(array); i++) begin
array[i][j] = "0";
$display ("array[%0d] = %s, %0dth index replaced by 0", i, array[i], j);
end
I'm not trying exactly that, but that's the spirit and it is what I was following for format.
It seems to be objecting to the comma, not the type declaration, and it happens both without the type declaration and with it. I don't think sv2v handles inline declarations there anyway?
Multiple increments are also legal. Is this a "which standard" question? That page claims "There can be multiple initializations done in the first part of a for loop" (as in C).
The error from sv2v is just a parse pointer: "Parse error: unexpected token ',' (Sym_comma)"
Regards
PTB
The text was updated successfully, but these errors were encountered:
sv2v doesn't seem to like this example from https://www.chipverify.com/systemverilog/systemverilog-for-loop or similar:
I'm not trying exactly that, but that's the spirit and it is what I was following for format.
It seems to be objecting to the comma, not the type declaration, and it happens both without the type declaration and with it. I don't think sv2v handles inline declarations there anyway?
Multiple increments are also legal. Is this a "which standard" question? That page claims "There can be multiple initializations done in the first part of a for loop" (as in C).
The error from sv2v is just a parse pointer: "Parse error: unexpected token ',' (Sym_comma)"
Regards
PTB
The text was updated successfully, but these errors were encountered: