Preserve extern keyword in function declarations
Include extern keyword in function declarations
Model Configuration Pane: Code Generation / Code Style
Description
Specify whether to include the extern keyword in function declarations in the generated code.
Note
The extern keyword is optional for functions with external
linkage, such as model entry-point functions, global or scoped root-level
Simulink® functions, and referenced model functions. However, including the
extern keyword in function declarations can enhance code
readability.
Dependencies
When another model references this model, specify the same value that the parent model uses.
Settings
on (default) | offDefault: on
- On
Include the
externkeyword in function declarations in the generated code.- Off
Remove the
externkeyword from function declarations in the generated code.
Examples
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Programmatic Use
Parameter: PreserveExternInFcnDecls |
| Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Version History
Introduced in R2009b