全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1640 2
2008-08-29
关于length 的概念,例如:First = 'Ipswich, England';City = substr(First,1,7)
;那末的length是First的长,还是substr(First,1,7)的结果后Ipswich的长?

还有这到76题,为何说是200呢?而不是从题目中得出来的长?谢谢
76. The following SAS program is submitted:
data work.test;
Author = 'Agatha Christie';
First = substr(scan(author,1,' ,'),1,1);
run;
Which one of the following is the length of the variable FIRST in the output
data set?
A. 1
B. 6
C. 15
D. 200
Answer: D
二维码

扫码加我 拉你入群

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

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

全部回复
2008-8-29 03:20:00
FIRST as variable, I don't think substr function can change its length.

There is kind of difference between the format of variable and the actual value of observation.

Such as:
Length First $ 200;

Set the length of First 200. The length of First does not change unless you reformat it.
二维码

扫码加我 拉你入群

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

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

2008-8-29 08:35:00
你这真的是想考BASE么?
找复习资料,把这个几个函数看下。一切就解决了啊。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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