複数の空白を圧縮し、先頭と末尾の空白を削除します。
| 種類: | 自動呼び出しマクロ |
| 要件 | MAUTOSOURCEシステムオプション |
& % ' " ( ) + − * / < > = ¬ ^ ~ ; , # blank AND OR NOT EQ NE LE LT GE GT IN
%macro createft;
%let footnote="The result of &x &op &y is %eval(&x &op &y).";
footnote1 &footnote;
footnote2 %cmpres(&footnote);
%mend createft;
data _null_;
x=5;
y=10;
call symput('x',x); /* Uses BEST12. format */
call symput('y',y); /* Uses BEST12. format */
call symput('op','+'); /* Uses $1. format */
run;
%createftFOOTNOTE1 "The result of 5 + _________10 is _________15."; FOOTNOTE2 "The result of 5 + 10 is 15.";
%let x=5; %let y=10; %let a=%nrstr(%eval(&x + &y)); %put QCMPRES: %qcmpres(&a); %put CMPRES: %cmpres(&a);
QCMPRES: %eval(&x + &y) CMPRES: 15