楼主: chasedreamtrue
3227 3

syntax errors [推广有奖]

  • 0关注
  • 0粉丝

本科生

78%

还不是VIP/贵宾

-

威望
0
论坛币
123 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
781 点
帖子
82
精华
0
在线时间
12 小时
注册时间
2007-7-30
最后登录
2010-10-24

楼主
chasedreamtrue 发表于 2008-8-22 14:39:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
117. The following SAS program is submitted:
data work.totalsales (keep = monthsales{12} );
set work.monthlysales (keep = year product sales);
array monthsales {12} ;
do i=1 to 12;
monthsales{i} = sales;
end;
run;
The data set named WORK.MONTHLYSALES has one observation per month
for each of five years for a total of 60 observations.
Which one of the following is the result of the above program?
A00-211
- 36 - http://www.ePlanetLabs.com
A. The program fails execution due to data errors.
B. The program fails execution due to syntax errors.
C. The program executes with warnings and creates the WORK.TOTALSALES
data set.
D. The program executes without errors or warnings and creates the
WORK.TOTALSALES data set.
Answer: B
为何选b 呢?
二维码

扫码加我 拉你入群

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

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

关键词:SYNTAX Errors Error err tax SYNTAX Errors

沙发
birdnick 发表于 2008-8-22 22:44:00

keep = monthsales{12}

这一句有问题,如果想要引用数组中的变量,要用 monthsales1-monthsales12,而不是monthsales{12}。当然假如不是12,是1或者2 的话,那选择A就是正确的了,但很显然程序中数据是没有问题的,只是语法不对。

藤椅
chasedreamtrue 发表于 2008-8-23 01:59:00
是不是可以这样理解:monthsales{12}是array name,然而monthsales1-12是variables name?

板凳
birdnick 发表于 2008-8-23 07:34:00
可以,[em01]

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

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