运行下面程序,结果都是result1,也就是说系统判断21.3<9.6。为什么呢?谢谢!
运行结果:
result1
21.3 9.6
- %let SellPrice=21.3;
- %let min=9.6;
- %macro a;
- %if %sysfunc(inputn(&SellPrice,8.))<%sysfunc(inputn(&min,8.)) %then %do;
- %put result1;
- %put %sysfunc(inputn(&SellPrice,8.)) %sysfunc(inputn(&min,8.));
- %end;
- %if %sysfunc(inputn(&SellPrice,8.))>%sysfunc(inputn(&min,8.)) %then %do;
- %put result2;
- %put %sysfunc(inputn(&SellPrice,8.)) %sysfunc(inputn(&min,8.));
- %end;
- %mend;
- %a
- %macro b;
- %if &SellPrice<&min %then %do;
- %put result1;
- %put &SellPrice &min;
- %end;
- %if &SellPrice>&min %then %do;
- %put result2;
- %put &SellPrice &min;
- %end;
- %mend;
- %b
- %macro c;
- %if &SellPrice>&min %then %do;
- %put result2;
- %put &SellPrice &min;
- %end;
- %if &SellPrice<&min %then %do;
- %put result1;
- %put &SellPrice &min;
- %end;
- %mend;
- %c



雷达卡


京公网安备 11010802022788号







