OUTPUT我一直理解不了,又跟没有时区别;
比如
do x=1 to10;
a+x;
run;
和
do x=1 to10;
a+x;
output;
run;
的区别在哪里?
另外如果在加入retain 情况又将如何呢?
再比如书上例子:
1、In the data set Work.Invest, what would be the stored value for Year?
data work.invest;
do year=1990 to 2004;
Capital+5000;
capital+(capital*.10);
end;
run;
a. missing
b. 1990
c. 2004
d. 2005
这个答案为D
2、Which of the following statements is false regarding the program shown below?
data work.invest;
do year=1990 to 2004;
Capital+5000;
capital+(capital*.10);
output;
end;
run;
a. The OUTPUT statement writes current values to the data set
immediately.
b. The stored value for Year is 2005.
c. The OUTPUT statement overrides the automatic output at the end of the
DATA step.
d. The DO loop performs 15 iterations.
这个答案为B,这不是与上面的正好相反吗?!求大神解答!