标题: 跟crakman做sas base认证试题(61) [打印本页] 作者: shiyiming 时间: 2010-11-13 16:40 标题: 跟crakman做sas base认证试题(61) From crackman's blog on Baidu
<p><font size="4" face="宋体">61.Consider the data step:<br>
<br>
data WORK.TEST;<br>
infile 'c:\class1.csv' dsd;<br>
input Name $ Sex $ Age Height Weight;<br>
if Age NE 16 and Age NE 15 then Group=1; <br>
else Group=2;<br>
run;<br>
<br>
Which statement produces a functionally equivalent result for assigning Group a value?</font></p>
<p><font size="4" face="宋体"> A. if Age not in(15,16) then Group=1; else Group=2; <br>
B. if (Age NE 16) or (Age NE 15) then Group=1; else Group=2;<br>
C. where Age not between 15 and 16 then Group=1; else Group=2;<br>
D. both A or C will work.</font></p>
<p><font size="4" face="宋体">Answer: A</font></p>
<p><br>
<font size="4" face="宋体">本题考察IF ELSE语句以及筛选条件。<br>
C是错误,WHERE不能这样与THEN连用,THEN只能与IF 配对使用。</font></p> <a href="http://hi.baidu.com/crack%5Fman/blog/item/96fbd0fdfd923f49242df2a5.html">阅读全文</a>