全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1122 2
2011-04-28
How many local symbol tables are created when macro A is called and begins to execute? Explain your answer.

%macro A(value=);
%B
%mend A;
%macro B;
%put The value to write is: &value.;
%put _user_;
%mend B;
%A(value=Today is Monday)



I print out this code:
one is : The value to write is: Today is Monday
the other : A VALUE Today is Monday

In the case, can we say that there is two local table?  Why the user-defined variable "VALUE" became capital words? I never defined before.

Could you any Da Niu tell me how it works ?

Sorry can't type Chinese.
二维码

扫码加我 拉你入群

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

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

全部回复
2011-4-29 07:48:04
anyme 发表于 2011-4-28 23:28
In the case, can we say that there is two local table?  Why the user-defined variable "VALUE" became capital words? I never defined before.

Could you any Da Niu tell me how it works ?

Sorry can't type Chinese.
Dear,  If my understanding of this question is right, there is zero (null) local table created by your code.

Try to put a code :

复制代码


in your SAS, The system defines it`s macro all with captial words, which is default setting.

复制代码


Try this code in your SAS, then you will know what is %put _user_; defines here :-)

I hope that helps.
二维码

扫码加我 拉你入群

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

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

2011-4-30 00:15:31
Thank you so much.

I think
1) Macro A has an associated local symbol table when executing
2) Macro B has not  an associated local symbol table when executing

2# qiuya
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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