himl_0006: MATLAB code if / elseif / else patterns
R2026bTerminate if/elseif/else
constructs with an else statement containing meaningful
comment
Usage: High-Integrity System Modeling
Guideline ID: himl_0006
Rules
| himl_0006: MATLAB® code if / elseif / else patterns |
|---|
For MATLAB code with Rationale
Verification Check if/elseif/else patterns in MATLAB Function blocks (Simulink Check) Example — Correct
Example — Incorrect
|
Industry Standards
IEC 61508-3, Table A.3 (3) 'Language subset'
IEC 61508-3, Table A.4 (3) 'Defensive programming'IEC 62304, 5.5.3 - Software Unit acceptance criteria
ISO 26262-6, Table 1(b) 'Use of language subsets'
ISO 26262-6, Table 1(d) 'Use of defensive implementation techniques'EN 50128, Table A.4 (11) 'Language Subset'
EN 50128, Table A.3 (1) 'Defensive Programming'EN 50657, Table A.4 (11) 'Language Subset'
EN 50657, Table A.3 (1) 'Defensive Programming'EN 50716, Table A.3 (1) 'Defensive Programming'
DO-331, Section MB.6.3.1.e 'Conformance to standards'
DO-331, Section MB.6.3.2.e 'Conformance to standards'
DO-331, Section MB.6.3.3.e 'Conformance to standards'