全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 经管百科 爱问频道
863 1
2018-02-18

%macro test( VarX, M_VarY);


/* VarX is a normal macro variable, so itis passed by

  value. */

/* Modify the value of VarX */

%let VarX=Customer_Income;

%put ********** Inside the macro test**************;

%put VarX=&VarX;


/* M_VarY is initialized as null and willbe changed

  here to return the value "Scorecard".  */

%put Initial value of M_VarY=&M_VarY;


%let &M_VarY=Scorecard;


%put ********* Leaving macro test******************;

%mend;


/* Using the macro test */


/* switch off the code echo */

option nosource;


%let VarX=Customer_Age; /* value of varX */

%let VarY=;    /* initializing VarY to a null string */


/* display the values before calling themacro */

%put ********  before calling the macro ************;

%put VarX=&VarX;

%put VarY=&VarY;


%test(&VarX, VarY);   /* Note that VarY is used without & */


/* display the values after executing themacro */

%put ********  after executing the macro ***********;

%put VarX=&VarX;

%put VarY=&VarY;


关于M_定义的宏参数,在其中的红字行,为什么在M_VarY=Scorecard前面用一个&

请问有没有教材具体介绍这个的,《SAS统计分析使用宝典》《The Little SAS Book》这两本书都没有介绍这个问题。


二维码

扫码加我 拉你入群

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

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

全部回复
2018-2-19 01:33:42
学习中
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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