Main Content
Indent style
Style for placement of braces
Model Configuration Pane: Code Generation / Code Style
Description
Specify style for the placement of braces in generated code.
Settings
K&R
(default) | Allman
Default: K&R
- K&R
For blocks within a function, an opening brace is on the same line as its control statement.
- Allman
For blocks within a function, an opening brace is on its own line at the same level of indentation as its control statement.
Examples
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |
Programmatic Use
Parameter: IndentStyle |
Type: character vector |
Value: 'K&R' |'Allman' |
Default: 'K&R' |
Version History
Introduced in R2013b