Specify comment style in the generated C/C++ code.
Category: Code Generation > Comments
Default:
Auto
Auto
For C code, generate single- or multiple-line comments delimited by
/*
and */
. For C++ code, generate single-line
comments preceded by //
.
Multi-line
Generate single- or multiple-line comments delimited by /*
and
*/
.
Example of code generated by using the multiline comment style is:
/* Sum: '<Root>/Sum' incorporates: * Constant: '<Root>/INC' * UnitDelay: '<Root>/X' */ rtDW.X_g++;
Single-line
Generate single-line comments preceded by //
.
Example of code generated by using the single-line comment style is:
// Sum: '<Root>/Sum' incorporates: // Constant: '<Root>/INC' // UnitDelay: '<Root>/X' rtDW.X_g++;
Note
For C code generation, select Single-line
only if your
compiler supports it.
This parameter:
Appears only for ERT-based targets.
Requires Embedded Coder® when generating code.
Parameter:
CommentStyle |
Type: character vector |
Value:
Auto | Multi-line |
Single-line |
Default:
Auto |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |