|
|
板凳

楼主 |
发表于 2007-6-28 10:27:09
|
只看该作者
Re: 结果为空
Hi,
You should know the difference of concepts: "column input" and "formatted input".
Obviously, you have misunderstood them.
Please see the codes below:
[code:c44e5]data temp;
input a $1 b $3; /* column input, equivalent to "input a $ 1 b $ 3;" */
put a b;
cards;
1 2
;
run;
data tmp;
set temp;
a=input(a,8.)+input(b,8.);
put a;
run;
data temp;
input a $1. +1 b $1.; /* formatted input */
put a b;
cards;
1 2
;
run;
data tmp;
set temp;
a=input(a,8.)+input(b,8.);
put a;
run;[/code:c44e5] |
|