楼主: zhangg
2034 1

[SAS] 请教:三段程序的不同. [推广有奖]

  • 0关注
  • 1粉丝

本科生

22%

还不是VIP/贵宾

-

威望
0 级
论坛币
14808 个
通用积分
0.0052
学术水平
4 点
热心指数
7 点
信用等级
2 点
经验
1080 点
帖子
106
精华
0
在线时间
42 小时
注册时间
2005-12-1
最后登录
2022-11-17

楼主
zhangg 发表于 2007-8-1 16:53:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
<P>有这么三段程序,产生数据集a b c.</P>
<P>data a;</P>
<P>do i=1 to 10;</P>
<P>i=i+1;</P>
<P>ouput;end;run;</P>
<P>data b;</P>
<P>do i=1 to 10;</P>
<P>i+1=i;</P>
<P>output;end;run;</P>
<P>data c;</P>
<P>do i=1,2,3,4,5,6,7,8,9,10;</P>
<P>i=i+1;</P>
<P>output;end;run;</P>
<P>如此产生的三个数据集,各不相同,为什么?</P>
二维码

扫码加我 拉你入群

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

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

关键词:output outpu Ouput Data End 请教 程序

沙发
allen802 发表于 2007-8-2 14:56:00
<P 0cm 0cm 0pt">数据集<FONT face="Times New Roman">a</FONT>中,首先,<FONT face="Times New Roman">i</FONT>取初值<FONT face="Times New Roman">1</FONT>,之后<FONT face="Times New Roman">i=i+1</FONT>变为<FONT face="Times New Roman">i</FONT>值为<FONT face="Times New Roman">2</FONT>输出,一个循环执行完之后,<FONT face="Times New Roman">i</FONT>值自动加<FONT face="Times New Roman">1</FONT>变为<FONT face="Times New Roman">3</FONT>执行第二个循环,输出<FONT face="Times New Roman">4</FONT>,依此类推,可得输出<FONT face="Times New Roman">6</FONT>,<FONT face="Times New Roman">8</FONT>,<FONT face="Times New Roman">10</FONT></P>
<P 0cm 0cm 0pt">数据集<FONT face="Times New Roman">c</FONT>中,由于每一次循环开始都重新依次赋值,所以与数据集<FONT face="Times New Roman">a</FONT>不同</P>
<P 0cm 0cm 0pt">至于数据集<FONT face="Times New Roman">b</FONT>还不太清楚,不过你中间那个语句好像也没什么作用,没必要吧</P>

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

客服
GMT+8, 2026-11-30 21:09