- Data temp;
- input x @@;
- if x > 0 then do;
- put 'x is positive';
- x=2*x;
- put x=;
- end;
- cards;
- -2 -1 0 1 2
- ;
- Run;
- Proc print;
- Run;
obs x
1 -2
2 -1
3 0
4 2
5 4
但是这段
- data temp;
- input x @@;
- if x > 0 then do;
- put x=2*x;
- put x=;
- end;
- cards;
- -2 -1 0 1 2
- ;
- Run;
- Proc print;
- Run;
obs x
1 -2
2 -1
3 0
4 1
5 2
这是为什么呢?



雷达卡




京公网安备 11010802022788号







