楼主: haierxd
571 0

[统计软件] 请教一个M_宏参数变量的问题 [推广有奖]

  • 0关注
  • 0粉丝

高中生

20%

还不是VIP/贵宾

-

威望
0
论坛币
19 个
通用积分
0
学术水平
0 点
热心指数
1 点
信用等级
0 点
经验
116 点
帖子
5
精华
0
在线时间
39 小时
注册时间
2017-9-12
最后登录
2021-4-27

楼主
haierxd 学生认证  发表于 2018-2-18 16:14:38 |只看作者 |坛友微信交流群|倒序 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

%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》这两本书都没有介绍这个问题。




二维码

扫码加我 拉你入群

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

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

关键词:scorecard Executing Customer Variable Initial

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

本版微信群
加JingGuanBbs
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-22 17:46