SAS implicitly uses %eval function to do a comparison in SAS macro language. This is correct when all elements are inters. Otherwise one needs to use %syaevalf if any of them is a floating number.
%macro a;
%let a=1;%let b=-2;%let c=2.38050453744706;
%if %sysevalf(&a>0) %then %put &a;
%if %sysevalf(&b>0) %then %put &b;
%if %sysevalf(&c>0) %then %put &c;
%mend;
%a;


雷达卡



京公网安备 11010802022788号







