我想从其他已经存在的宏变量中创建一个新的宏变量。
我尝试了 , 的多种变体,call symput
但无济于事...%eval
input
我想d
评估为 3 / 30 = .10。
***** taken directly from the sas help files... ;
%let a=1+2;
%let b=10*3;
%let c=5/3;
%let eval_a=%eval(&a);
%let eval_b=%eval(&b);
%let eval_c=%eval(&c);
%put &a is &eval_a;
%put &b is &eval_b;
%put &c is &eval_c; * not sure why this evaluates to 1, but I'm sure it's documented somewhere... ;
***** This evaluates to 0...
%let d = %eval(%eval(&a) / %eval(&b)) ;
%put &d ;
非常感谢...