Convert if-elseif-else patterns to switch-case statements
Conversion of if-elseif-else
patterns to
switch-case
statements
Description
App Configuration Pane: Code Appearance
Configuration Objects: coder.EmbeddedCodeConfig
Conversion of if-elseif-else
patterns to
switch-case
statements in the generated code.
See Controlling C Code Style (Embedded Coder).
Settings
- Off
This value is the default value.
The code generator does not convert
if-elseif-else
patterns toswitch-case
statements.- On
The code generator tries to convert
if-elseif-else
patterns toswitch-case
statements. The code generator produces aswitch-case
statement only if all potential case expressions are scalar integer values.
Programmatic Use
Property:
ConvertIfToSwitch |
Values: false |
true |
Default: false |
Version History
Introduced in R2011a