Main Content

Maximum line width

Description

Specify the maximum line width for wrapping generated code.

Category: Code Generation > Code Style

Settings

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

Example

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 */
The tail comments are generated on a new line with right justification.

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 */

Command-Line Information

Parameter: MaxLineWidth
Type: integer
Value: integer from 50–1000
Default: 80

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics