マクロ変数のスコープがグローバルであるかどうかを示す値を返します。
| 種類: | マクロ関数 |
1を返し、それ以外の場合は0を返します。グローバル/ローカルシンボルテーブルやマクロ変数のスコープに関する詳細については、マクロ変数のスコープを参照してください。1および0を、それぞれTRUEおよびFALSEに変換しています。
%global x;
%macro test;
%local y;
%if %symglobl(x) %then %put %nrstr(%symglobl(x)) = TRUE;
%else %put %nrstr(%symglobl(x)) = FALSE;
%if %symglobl(y) %then %put %nrstr(%symglobl(y)) = TRUE;
%else %put %nrstr(%symglobl(y)) = FALSE;
%if %symglobl(z) %then %put %nrstr(%symglobl(z)) = TRUE;
%else %put %nrstr(%symglobl(z)) = FALSE;
%mend test;
%test;%symglobl(x) = TRUE %symglobl(y) = FALSE %symglobl(z) = FALSE