Specify the maximum line width for wrapping generated code.
Category: Code Generation > Code Style
Default:
80
Specify an integer value that indicates the maximum number of columns in a single line
of generated code. Possible values range from 50–1000
columns.
If the comments exceed the maximum line width specified, the tail comments are generated on a new line with right justification. Other types of comments are not wrapped:
#define
tail comments
Simulink block comments
Stateflow object comments
Banner comments
Here is generated code that is wrapped using the default Maximum line
width value
80
:
/* Definition for custom storage class: Default */ real_T const_val[4] = { 1.0, 2.0, 3.0, 4.0 } ; /* This parameter defines the vector of output index values */
Here is the same code wrapped with Maximum line width set to
120
:
/* Definition for custom storage class: Default */ real_T const_val[4] = { 1.0, 2.0, 3.0, 4.0 } ;/* This parameter defines the vector of output index values */
Parameter:
MaxLineWidth |
Type: integer |
Value: integer from
50–1000 |
Default:
80 |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |