Preserve operand order in expression

Description

Specify whether to preserve order of operands in expressions.

Category: Code Generation > Code Style

Settings

Default: off

On

Preserves the expression order specified in the model. Select this option to increase readability of the code or for code traceability purposes.

A*(B+C)
Off

Optimizes efficiency of code for nonoptimized compilers by reordering commutable operands to make expressions left-recursive. For example:

(B+C)*A

Command-Line Information

Parameter: PreserveExpressionOrder
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityOn
EfficiencyOff
Safety precaution

No recommendation

Related Topics