楼主: chasedreamtrue
3410 3

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

扫码加我 拉你入群

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

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

关键词:SYNTAX Errors Error err tax SYNTAX Errors

沙发
birdnick 发表于 2008-8-22 22:44:00
<p>keep = monthsales{12} <br/></p><p>这一句有问题,如果想要引用数组中的变量,要用 monthsales1-monthsales12,而不是monthsales{12}。当然假如不是12,是1或者2 的话,那选择A就是正确的了,但很显然程序中数据是没有问题的,只是语法不对。</p>

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

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

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

客服
GMT+8, 2026-11-27 10:57