# VERILOG2079: "foreach" loops should not use multidimensional brackets when declaring loop variables ## Summary ```{raw} html

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
MEDIUM--Intentionality | Logical5minsynthesis, portability, vscode, simulation, linter
``` ## Description ```{raw} html

Noncompliant code example

module top;
  int array[8][8];
  initial begin
    foreach (array[i]) begin
      foreach (array[i][j]) begin // Noncompliant
        array[i][j] = i * j;
      end
    end
  end
endmodule

foreach loops are not allowed to have multidimensional brackets when declaring loop variables.

Even if most tools allow it, refrain from using this syntax to keep your code portable.

``` ## Parameters No parameters. ```{raw} html ```