全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1571 1
2015-02-15
The following program is submitted:
data fltaten;
input jobcode $ salary name $;
cards;
FLAT1 70000 Bob
FLAT2 60000 Joe
FLAT3 30000 Ann
;
run;
data desc;
set fltaten;
if salary>60000 then description='Over 60';
else description='Under 60';
run;
What is value of the variable named description when the value for salary is 30000?
a. Under 6
b. Under 60
c. Over 60
d. ' ' (missing character value)
Correct answer:  a


[size=13.3333330154419px]想请教一下,为什么0被省略了?为什么长度就是7呢?
二维码

扫码加我 拉你入群

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

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

全部回复
2015-2-15 23:00:59
description的最初值为’over 60‘,长度为7,一般变量的长度都以最初值为准,除非在set之前加个length语句来定义其长度。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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