Main Content

jc_0222: Usable characters for signal and bus names

Sub ID Recommendations

  • NA-MAAB — a, b, c, d, e, f

  • JMAAB — a, b, c, d, e, f

MATLAB Versions

All

Rule

Sub ID a

Only these character types shall be used in signal and bus names:

  • Single-byte alphanumeric characters (a-z, A-Z, 0-9)

  • Single-byte underscore (_)

Line breaks, single-byte spaces, double-byte characters, and control characters shall not be used.

Custom Parameter

Not Applicable

Sub ID b

Signal and bus names shall not use numbers at the beginning.

Custom Parameter

Not Applicable

Sub ID c

The signal or bus name shall not use underscores at the beginning.

Custom Parameter

Not Applicable

Sub ID d

Signal and bus names shall not use underscores at the end.

Custom Parameter

Not Applicable

Sub ID e

Signal and bus names shall not use consecutive underscores.

Custom Parameter

Not Applicable

Sub ID f

Signal and bus names shall not consist solely of a single reserved MATLAB® word.

Custom Parameter

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 IDs 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 IDs f:

  • Readability is impaired.

  • Deviation from the rule can cause unexpected issues.

Verification

Model Advisor check: Check usable characters for signal names and bus names (Simulink Check)

Last Changed

R2020a

See Also

Introduced in R2020a