楼主: anyme
1149 2

[问答] Macro local table [推广有奖]

  • 0关注
  • 0粉丝

本科生

18%

还不是VIP/贵宾

-

威望
0
论坛币
982 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
495 点
帖子
64
精华
0
在线时间
54 小时
注册时间
2005-4-6
最后登录
2022-5-27

楼主
anyme 发表于 2011-4-28 23:28:30 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
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.
二维码

扫码加我 拉你入群

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

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

关键词:Macro Local Table ABLE ABL Macro Table

沙发
qiuya 发表于 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 :


  1. %put _All_;
复制代码


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

  1. %macro B (value=);
  2. %put The value to write is: &value.;
  3. %put _user_;
  4. %mend B;

  5. %B (value = Today is Monday)
复制代码


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

I hope that helps.

藤椅
anyme 发表于 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

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-20 07:06