全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2117 2
2015-08-25

The following SASprogram is submitted: data work.test;


First = 'Ipswich,England'; City = substr(First,1,7);


City_Country=City!!'; '!!'England'; run;


Which one of thefollowing is the value of the variable CITY_COUNTRY in the outputdata set?


A. Ipswich!!


B. Ipswich, EnglandC. Ipswich, 'England'


D. Ipswich , England


二维码

扫码加我 拉你入群

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

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

全部回复
2015-8-27 23:31:37
楼主你把题目打错啦,不然一个正确答案都没有哦。
这是123题中的72题,

The following SAS program is submitted:

data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country=City!!','!!'England';
run;

Which one of thefollowing is the value of the variable CITY_COUNTRY in the outputdata set?

A. Ipswich!!
B. Ipswich, England
C. Ipswich, 'England'
D. Ipswich , England

根据书上说的,if the SUBSTR function returns a value to a variable that was not yet assigned a length, by defaulf, the variable length is determined by the length of the first argument.
if you omit the length, SAS extracts the remainder of the expression

所以答案是D,表明了City的长度不止7,后面应该有空格才对。
二维码

扫码加我 拉你入群

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

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

2015-8-28 03:59:34
谢谢 我还没懂 我的d不是也有空格吗
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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