Main Content

namelengthmax

Maximum identifier length

Description

example

l = namelengthmaxreturns the maximum length allowed for MATLAB®identifiers. MATLAB identifiers include:

  • 变量names

  • Structure field names

  • Script, function, and class names

  • Model names

Use thenamelengthmaxfunction instead of hard-coding a specific maximum name length into your programs. Then, if the identifier length changes in a future MATLAB release, it is not necessary to update this limit in your code.

Examples

collapse all

l = namelengthmax
l = 63
Introduced before R2006a