namelengthmax - Maximum identifier length - MATLAB (original) (raw)
Main Content
Maximum identifier length
Syntax
Description
l = namelengthmax
returns the maximum length allowed for MATLAB® identifiers. MATLAB identifiers include:
- Variable names
- Structure field names
- Script, function, and class names
- Model names
Use the namelengthmax
function 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
Determine Maximum MATLAB Identifier Length
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™. (since R2024b)
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool
or accelerate code with Parallel Computing Toolbox™ ThreadPool
.
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Version History
Introduced before R2006a