jc_0232: Usable characters for parameter names
Since R2020a
Guideline Publication
Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®
Sub ID Recommendations
NA-MAAB — d, e
JMAAB — a, b, c, d, e, f
MATLAB Versions
All
Rule
Sub ID a
Only these character types shall be used in parameter names:
Single-byte alphanumeric characters (
a-z
,A-Z
,0-9
)Single-byte underscore (
_
)
Line break, single-byte space, double-byte characters, and control characters shall not be used.
Not Applicable
Sub ID b
The parameter name shall not use numbers at the beginning.
Not Applicable
Sub ID c
The parameter name shall not use underscores at the beginning.
Not Applicable
Sub ID d
The parameter name shall not use underscores at the end.
Not Applicable
Sub ID e
The parameter name shall not use consecutive underscores.
Not Applicable
Sub ID f
The parameter name shall not consist solely of a single reserved MATLAB word.
Not Applicable
Rationale
Sub IDs a, b:
Deviation from the rule can make it difficult to maintain the integrity of the model and code.
Sub IDs c, e:
Readability is impaired.
Sub ID d:
Readability is impaired.
Underscores can be used to separate words. However, they are typically used as word breaks and can cause misunderstanding in the description.
Sub ID f:
Readability is impaired. Deviation from the rule can cause unexpected issues.
Verification
Model Advisor check: Check usable characters for parameter names (Simulink Check)
Last Changed
R2020a
See Also
Reserved Keywords (Embedded Coder)
Reserved Identifiers and Code Replacement (Embedded Coder)
Version History
Introduced in R2020a