全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2441 1
2016-06-15
74. the following SAS programing is submitted;
% macro one(input);
%two
%put the value is &date;
%mend;

%macro two;
data _null_;
call symput('date','12SEP2008');
run;
%mend;
%let date=31DEC2006;
%one(&date)
what is the result when the %put statement executs?
为什么选A a macro variable date with the value 12SEP2008 is retrieved from the golbal symbol table
真的是搞不明白这个局部宏和全局宏,感觉每次题目稍微变一下 我就不知道选什么,之前好像还遇到一道题,应该又是引用的应该是局部宏呀 ,而且12SEP2008  不就是局部宏吗?
能不能有哪位大神解释下,真的是没搞懂这个宏的引用



二维码

扫码加我 拉你入群

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

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

全部回复
2016-6-16 16:17:07
另外一道题 类似 但答案不一样的
%macro trans;
%let type=airplane;
proc print data=sasuser.activities;
  where trans="&type";
run;
%location(automobile)
%put type is &type;
%mend;
%macro location(type);
data _null_;
call symput('type','Train');
run;
mend%;
%trans
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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