全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1873 2
2015-02-17
The following SAS program is submitted:
data test;
input animal1 $ animal2 $
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. animal 1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000
b. animal1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000.87
此题为什么选B?我觉得应该是A啊,数值型的变量不是默认的长度是8吗?

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-2-17 15:33:06
记不太清了,好像是说数值型变量如果包含point话,就不需要设置长度,直接按原数据长度。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-2-19 03:33:03
Numeric values in SAS for UNIX are represented as IEEE double-precision floating-point numbers. The decimal precision of a full 8-byte number is effectively 15 decimal digits.
这里8位是指二进制表示的长度,不是字符串长度

When a format is not specified for writing a numeric value, SAS uses the BESTw. format as the default format. 这里默认长度是12,所以90800000.87可以全部显示
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群