【发布时间】:2014-09-30 11:27:06
【问题描述】:
为什么这么简单的宏程序:
%macro test1(N=,NN=);
proc iml;
start fun_test(x) global(&NN,&N);
x=&NN+&N;
finish fun_test;
call fun_test(x);
print x;
run;
quit;
%mend test1;
%test1(N=10,NN=22);
给出错误? :
22
ERROR 22-322: Expecting a name.
ERROR 200-322: The symbol is not recognized and will be ignored.
【问题讨论】:
-
实际上,它给出了正确的答案,但这个错误仍然存在
-
不应该更像:
%macro test1(N,NN); proc iml; start fun_test(x) global(&NN,&N); x=&NN+&N; finish fun_test; call fun_test(x); print x; run; quit; %mend test1; %test1(10,22); -
谢谢@jj72uk 但我仍然有同样的错误
-
我们还可以添加:Options symbolgen;在调用宏之前