标题: 跟crakman做sas base认证试题(10) [打印本页] 作者: shiyiming 时间: 2010-11-11 01:05 标题: 跟crakman做sas base认证试题(10) From crackman's blog on Baidu
<p><font size="4">10.The following SAS program is submitted:<br>
<br>
data WORK.RETAIL;<br>
Cost='$20.000';<br>
Discount=.10*Cost; <br>
run; <br>
<br>
What is the result?</font></p>
<p><font size="4"> A. The value of the variable Discount in the output data set is 2000.No messages are written to the SAS log.<br>
B. The value of the variable Discount in the output data set is 2000.A note that conversion has taken place is written to the SAS log.<br>
C. The value of the variable Discount in the output data set is missing.A note in the SAS log refers to invalid numeric data.<br>
D. The variable Discount in the output data set is set to zero.No messages are written to the SAS log.</font></p>
<p><font size="4">Answer: C<br>
本文属于博客:</font><a href="http://hi.baidu.com/crack_man/home"><font size="4"><!-- m --><a class="postlink" href="http://hi.baidu.com/crack_man/home">http://hi.baidu.com/crack_man/home</a><!-- m --></font></a><font size="4"> 版权归作者所有,如有转载,请注明出处!未经本作者同意不得用于商业应用。<br>
其他本博客文章均作此声明!</font></p>
<p><font size="4">本题考察是数据格式以及在表达式中的转换机制<br>
DISCOUNT最终为缺失值.,也就是PDV初始值缺失值。<br>
如果程序改成:<br>
data WORK.RETAIL;<br>
Cost='20.000';<br>
Discount=.10*Cost;<br>
Put Discount; <br>
run; <br>
结果由是如何呢?<br>
读者自己运行一下!<br>
结合前几个例子里面的MDY函数。<br>
</font></p> <a href="http://hi.baidu.com/crack%5Fman/blog/item/42c1ecd96792d3ff77c638e8.html">阅读全文</a>