Check usable characters for parameter names
Check ID:
mathworks.jmaab.jc_0232
Guideline: jc_0232: Usable characters for parameter names
Description
Checks if parameter names in a model adhere to the following guideline standards.
Contain only alphanumeric characters and underscores.
Do not begin with a number.
Do not begin or end with an underscore.
Do not have consecutive underscores.
Do not coincide with reserved MATLAB® words.
Note
Reserved MATLAB words include the following:
Built-in functions:
builtin
Functions in the MATLAB path: Functions List
Reserved Keywords (Embedded Coder)
nil
nan
inf
infinity
Reserved MATLAB words and variable names are case-insensitive.
This check requires a Simulink® Check™ license.
Check Parameterization
This check contains sub-checks that correspond to sub IDs specified in the MAB and JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.
For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:
NA-MAAB — a, b, c, d, e, f
JMAAB — a, b, c, d, e, f
Results and Recommended Actions
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
jc_0232_a: Characters allowed for parameter names | One or more parameter names contain invalid characters. | Use only alphanumeric characters and underscores in parameter names. |
jc_0232_b: Number at the beginning | One or more parameter names begin with a number. | Use alphabetic characters at the beginning of parameter names. |
jc_0232_c: Underscore at the beginning | One or more parameter names begin with an underscore ("_"). | Use alphabetic characters at the beginning of parameter names. |
jc_0232_d: Underscore at the end | One or more parameter names end with an underscore ("_"). | Do not end parameter names with underscores. |
jc_0232_e: Consecutive underscores | One or more parameter names have consecutive underscores. | Do not use consecutive underscores in parameter names. |
jc_0232_f: Single reserved MATLAB word | The parameter name is a reserved MATLAB word. | Do not use reserved MATLAB words as parameter names. |
Capabilities and Limitations
Simulink semantics limit the use of parameter names that use invalid characters, or start with a number, underscore, or reserved MATLAB word.
Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to
on
.Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to
graphical
.Supports exclusions of blocks or charts.