이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
전역 변수 표현
스토리지 클래스를 사용하여 전역 변수 표현을 제어
전역 변수에 스토리지 클래스를 할당하여 생성된 C/C++ 코드에서 전역 변수의 표현을 제어합니다. 코드 생성에서 스토리지 클래스는 생성 코드에 있는 변수의 선언과 정의를 결정하는 사양입니다. 스토리지 클래스를 사용하면 생성 코드를 외부 코드와 통합할 수 있습니다. MATLAB® 코드에서 코드를 생성하는 경우 전역 변수에만 스토리지 클래스를 사용할 수 있습니다. 전역 변수에 스토리지 클래스를 할당하려면 MATLAB 코드에서 coder.storageClass
함수를 사용하십시오.
함수
coder.storageClass | Assign storage class to global variable |
도움말 항목
- Storage Classes for Code Generation from MATLAB Code
A storage class determines the declaration and definition of a global variable in C/C++ code generated from MATLAB code.
- Control Declarations and Definitions of Global Variables in Code Generated from MATLAB Code
Assign storage classes to global variables to control their representation in C/C++ code generated from MATLAB code.