# VHDL237: "others" should be the last clause of a case statement ## Summary ```{raw} html

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
--MEDIUMIntentionality | Clear5minsynthesis, vscode, simulation, linter
``` ## Description ```{raw} html

Noncompliant code example

case my_case is
  when 0 => z <= a;
  when others => z <= d; -- Noncompliant: "others" clause should be the last item of the "case" statement
  when 1 => z <= b;
  when 2 => z <= c;
end case;

Compliant solution

case my_case is
  when 0 => z <= a;
  when 1 => z <= b;
  when 2 => z <= c;
  when others => z <= d; -- Compliant: "other" clause is the last item of the "case" statement
end case;

To improve understandability, the others clause should be the last item of a case statement.

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