RTW.reservedIdentifiers
Description
[
returns structures that contain lists of reserved keywords. If your model uses a reserved
keyword as an identifier, then the code generator attempts to replace that keyword when it
generates identifiers in the code. Use the c
, cpp
] = RTW.reservedIdentifiers()RTW.reservedIdentifiers()
function to retrieve the list of keywords that the code generator attempts to
replace.
Examples
Retrieve Reserved Identifiers
Retrieve reserved identifiers that the code generator attempts to replace.
[c, cpp] = RTW.reservedIdentifiers()
c = struct with fields: reservedWords: {103×1 cell} fileNames: {29×1 cell} namesInLibraries: {1112×1 cell} cpp = struct with fields: reservedWords: {42×1 cell} fileNames: {85×1 cell} namesInLibraries: {1112×1 cell}
Output Arguments
c
— C reserved identifiers
struct
C reserved identifiers, returned as a struct
.
The struct
contains these fields.
Field Name | Description |
---|---|
reservedWords | Keywords that the code generator reserves because the C language specification reserves them, returned as a cell array. The code generator attempts to replace these if the model uses them as identifiers. |
fileNames | Keywords that the code generator reserves because they match the names of C standard library files, returned as a cell array. The MATLAB® Coder™ code generator attempts to rename generated files that match these keywords. You can use keywords that appear in only this field as identifiers. The Simulink® Coder and Embedded Coder® code generators do not perform this check. |
namesInLibraries | Keywords that the code generator reserves because they are used in
commonly used libraries, returned as a cell array. The code generator attempts
to replace these if the model uses them as identifiers. This list is shared
between C and C++ and is returned in full in each
struct . |
cpp
— C++ reserved identifiers
struct
C++ reserved identifiers, returned as a struct
.
The struct
contains these fields.
Field Name | Description |
---|---|
reservedWords | Keywords that the C++ code generator reserves because the C++ language specification reserves them, returned as a cell array. The code generator attempts to replace these if the model uses them as identifiers. This list does not include keywords that the C language specification reserves, but the C++ code generator attempts to replace those keywords as well. |
fileNames | Keywords that the code generator reserves because they match the names of C++ standard library files, returned as a cell array. The MATLAB Coder code generator attempts to rename generated files that match these keywords. You can use keywords that appear in only this field as identifiers. The Simulink Coder and Embedded Coder code generators do not perform this check. This list does not include filenames from the C standard library, but the C++ code generator attempts to replace those filenames as well. |
namesInLibraries | Keywords that the code generator reserves because they are used in
commonly used libraries, returned as a cell array. The code generator attempts
to replace these if the model uses them as identifiers. This list is shared
between C and C++ and is returned in full in each
struct . |
Version History
Introduced in R2023b
See Also
Topics
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)