マクロ変数が存在するかどうかを返します。
| 種類: | マクロ関数 |
1および0を、それぞれ値TRUEおよびFALSEに変換しています。
%global x;
%macro test;
%local y;
%if %symexist(x) %then %put %nrstr(%symexist(x)) = TRUE;
%else %put %nrstr(%symexist(x)) = FALSE;
%if %symexist(y) %then %put %nrstr(%symexist(y)) = TRUE;
%else %put %nrstr(%symexist(y)) = FALSE;
%if %symexist(z) %then %put %nrstr(%symexist(z)) = TRUE;
%else %put %nrstr(%symexist(z)) = FALSE;
%mend test;
%test;%symexist(x) = TRUE %symexist(y) = TRUE %symexist(z) = FALSE