楼主: hailingkatherin
1932 2

数值型变量 字符型变量 [推广有奖]

  • 0关注
  • 0粉丝

已卖:13份资源

硕士生

82%

还不是VIP/贵宾

-

威望
0
论坛币
277 个
通用积分
0
学术水平
1 点
热心指数
5 点
信用等级
1 点
经验
164 点
帖子
126
精华
0
在线时间
87 小时
注册时间
2015-1-18
最后登录
2016-5-15

楼主
hailingkatherin 发表于 2015-2-17 09:46:32 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
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吗?

二维码

扫码加我 拉你入群

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

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

关键词:字符型变量 数值型 字符型 represents following represents following animal values

沙发
琉夜 发表于 2015-2-17 15:33:06
记不太清了,好像是说数值型变量如果包含point话,就不需要设置长度,直接按原数据长度。

藤椅
CathyHong 发表于 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可以全部显示

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-7 11:31