Specify style for the placement of braces in generated code.
Category: Code Generation > Code Style
Default: K&R
For blocks within a function, an opening brace is on the same line as its control statement. For example:
void rt_OneStep(void)
{
static boolean_T OverrunFlag = 0;
if (OverrunFlag) {
rtmSetErrorStatus(rtwdemo_counter_M, "Overrun");
return;
}
OverrunFlag = TRUE;
rtwdemo_counter_step();
OverrunFlag = FALSE;
}For blocks within a function, an opening brace is on its own line at the same level of indentation as its control statement. For example:
void rt_OneStep(void)
{
static boolean_T OverrunFlag = 0;
if (OverrunFlag)
{
rtmSetErrorStatus(rtwdemo_counter_M, "Overrun");
return;
}
OverrunFlag = TRUE;
rtwdemo_counter_step();
OverrunFlag = FALSE;
}Parameter: IndentStyle |
| Type: character vector |
Value: 'K&R' |'Allman' |
Default: 'K&R' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |