由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 请教两道SAS变量长度的题目
相关主题
帮忙看一道题a question about length assignment
再问三个关于length的问题,谢谢another sas question
百思不得其解的sas base 123题第76题还问道SAS的题目
问一SAS Base的题目SAS BASE的一道题不明白,青椒
问一个sas的问题4SAS base string question
SAS 小问题求助!!base 123题第72/73题求解:关于substr的返回长度
#SAS BASE 问题,明天就考试了##问个SAS SCAN的问题
a problem from sas base test[合集] 请教sas base 123中几题
相关话题的讨论汇总
话题: substr话题: first话题: run话题: data话题: 长度
进入Statistics版参与讨论
1 (共1页)
z****n
发帖数: 67
1
题目1:
data w;
first="ipswich, england";
c_c=substr(first,1,7)!!','!!'english';
run;
proc contents data=w; run;
上面这段程序为什么c_c的长度是24呢?我觉得应该是7+1+7=15.
题目2:
data u;
author="agatha christie";
first=substr(scan(author,1,','),1,1);
run;
proc contents data=u; run;
上面这段程序为什么first的长度是200呢?我觉得应该是1.
多谢!
s*******f
发帖数: 148
2
The SCAN function causes SAS to assign a length of 200 bytes to the target
variable in an assignment statement. Most other character functions cause
the target to have the same length as the original value, such as SUBSTR.
For the first question, the length is 16(original)+1+7=24.
d*******o
发帖数: 493
3
Are you sure that you used || instead of !!
1 (共1页)
进入Statistics版参与讨论
相关主题
[合集] 请教sas base 123中几题问一个sas的问题4
弱问:一道BASE题,怎么也不明白SAS 小问题求助!!
SAS BASE 快疯掉了!!!!#SAS BASE 问题,明天就考试了##
面试说有个SAS test, 这种test 一般都考什么呀?a problem from sas base test
帮忙看一道题a question about length assignment
再问三个关于length的问题,谢谢another sas question
百思不得其解的sas base 123题第76题还问道SAS的题目
问一SAS Base的题目SAS BASE的一道题不明白,青椒
相关话题的讨论汇总
话题: substr话题: first话题: run话题: data话题: 长度