Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

na_0018: Number of nested if/else and case statement

ID: Title

na_0018: Number of nested if/else and case statement

Priority

Strongly recommended

Scope

NA-MAAB

MATLAB Versions

All

Prerequisites

None

Description

The number of levels of nested if / else and case statements should be limited, typically to 3 levels.

Rationale

  • Readability

  • Code Generation

See Also

  • NASA Orion style guideline jr_0002: Number of nested if/else and case statement blocks

Last Changed

V3.0

Model Advisor Check

By Task > Modeling Standards for MAAB > MATLAB Functions > Check MATLAB Function metrics

For check details, see Check MATLAB Function metrics (Simulink Verification and Validation).

Introduced in R2013a

Was this topic helpful?