楼主: unicorn5566
1358 1

[原创博文] sas base 50 题中的39题,恳请解惑! [推广有奖]

  • 0关注
  • 0粉丝

已卖:25份资源

高中生

27%

还不是VIP/贵宾

-

威望
0
论坛币
159 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
162 点
帖子
16
精华
0
在线时间
34 小时
注册时间
2010-6-25
最后登录
2015-11-24

楼主
unicorn5566 发表于 2012-7-14 16:37:05 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
33.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. 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

答案:B

解释是:The CARDS statement is an alias for the DATALINES statement. In the INPUTstatement, you must specify a dollar sign ($) after the variable name in order to define acharacter variable. If you do not specify otherwise, the default storage length for avariable is 8. In the example above, the character value hummingbird is truncated tohummingb.
有两个问题不明白:1, list input 不是读到空格才会读下一个值吗? 为什么这里会 truncated ?2, 解释里说没有定义dollar sign ($)的时候才会truncate,但是题目程序里已经定义了呀
恳请各位高人解惑,谢谢!!
二维码

扫码加我 拉你入群

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

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

关键词:SAS base Base represents statement following represents following animal values

沙发
unicorn5566 发表于 2012-7-15 19:54:52
恩……已经自己搞明白了……

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

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