题目如下:The following SAS program is submitted:
data test;
input animal1 $ animal 2 $ mlgrams1 mlgrams2;
cards;
hummingbird ostrich 54000.39 90800000.87
;
run;
Which one of the following represents the values of each variable in the output data set?
a. animal1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000
b. animal1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000.87
c. animal1 animal2 mlgrams1 mlgrams2
hummingbird ostrich 54000.39 90800000
d. animal1 animal2 mlgrams1 mlgrams2
hummingbird ostrich 54000.39 90800000.87
答案是a,详解中说的是:In the INPUT statement, you must specify a dollar sign ($) after the variable name in order to define a character variable. If you do not specify otherwise, the default storage length for a variable is 8. In the example above, the character value hummingbird is truncated to hummingb.
但是题目中的animal1后面不是加上了$么?而且如果数值型变量的默认长度是8位,为什么90800000.87没有变成90800000呢?小白求解啊~~~谢各路大神