이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
식별자
코드 생성기가 코드 구조에 대한 식별자를 생성하는 방법을 구성할 수 있습니다. 식별자 명명 규칙을 사용하여 의미 있고 고유하며 추적 가능한 식별자를 생성하십시오. 모델 구성 세트, 코드 매핑 편집기 및 Embedded Coder® 사전에서 식별자 명명 규칙을 사용할 수 있습니다.
생성된 식별자의 최대 길이를 제어하고 이름 충돌을 방지하기 위해 이름 변형(mangling) 텍스트를 포함할 수 있습니다. 토큰 데코레이터를 사용하면 정규 표현식을 사용하여 식별자의 내용을 제어할 수 있습니다. C 및 C++의 키워드와 같은 일부 키워드는 식별자로 유효하지 않습니다.
함수
RTW.reservedIdentifiers | Get reserved identifiers for code generation (R2023b 이후) |
도움말 항목
- Identifier Format Control
You can customize generated identifiers by using identifier naming rules.
- Modify Identifier Format Tokens by Using Token Decorators
Specify modifications to expanded values of identifier format tokens.
- Specify Boolean and Data Type Limit Identifiers
Integrate the generated code with your code by specifying the identifiers that correspond to Boolean
falseandtrue. Also, specify the identifiers that correspond to data type limits, which the generated code uses to determine overflows. - Reserved Keywords
If you use the code generator to produce C or C++ code, your model must not contain keywords that are reserved for internal use.
- Avoid Identifier Naming Collisions
Use model configuration parameters and best practices to avoid identifier collisions and maintain traceability in generated code.
