楼主: miraclescreator
2304 1

请教123的第76题 附题目 [推广有奖]

  • 5关注
  • 3粉丝

已卖:239份资源

博士生

41%

还不是VIP/贵宾

-

威望
0
论坛币
990 个
通用积分
1.8500
学术水平
2 点
热心指数
2 点
信用等级
2 点
经验
1841 点
帖子
183
精华
0
在线时间
311 小时
注册时间
2009-2-2
最后登录
2024-1-24

楼主
miraclescreator 发表于 2010-9-24 07:42:13 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
data work.test;Author = ’Agatha Christie';
First= substr(scan(author, 1, ','),1,1);
run;

最后问 First 在output中的length 是200???????
我觉得取出来的是字母A啊
二维码

扫码加我 拉你入群

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

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

关键词:Christie Christi Author output Agatha 请教 题目

沙发
pobel 在职认证  发表于 2010-9-24 08:18:38
这里考察的是scan()和substr()的规则

SCAN:
If the SCAN function returns a value to a variable that has not yet been assigned a length, by default the variable is assigned a length of 200.

SUBSTR:
If the SUBSTR function returns a value to a variable that has not yet been assigned a length, by default the variable length is determined by the length of the first argument.

data work.test;
        Author = 'Agatha Christie';
        First= substr(scan(author, 1, ','),1,1);
        second=substr(author,1,1);
        length third $3;
        third=substr(author,1,1);

    len1=lengthm(first);
        len2=lengthm(second);
        len3=lengthm(third);
        put len1=   len2=  len3=;
run;
和谐拯救危机

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-27 10:13