全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2046 3
2015-05-05
楼主小白,想请教各位巨巨一道题!谢谢啦!
81. at the start of a new SAS session, the following program is submitted:
%macro one;
data_null_;
call symput('proc','means');
run;
proc &proc data=sashelp.class;
run;
%mend;
%one();
答案是the macro variable PROC is stored in the global symbol table,请问为什么不是local symbol table呢?
二维码

扫码加我 拉你入群

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

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

全部回复
2015-5-5 16:38:19
自答:应该是l此时ocal symbol table为空,所以存到更外层的global symbol table
Call SYMPUT() 会将创建的宏变量存入到最近的非空的symbol table 中,如果运行到call symput时宏location里已经有了局部宏变量,那call symput创建的宏变量就是local的,否则就会存到更外层。 SAS HELP: "SYMPUT puts the macro variable in the most local nonempty symbol table. A symbol table is nonempty if it contains a value a computed %GOTO (A computed %GOTO contains % or & and resolves to a la ...
二维码

扫码加我 拉你入群

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

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

2015-5-9 07:13:41
同学习
二维码

扫码加我 拉你入群

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

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

2016-2-18 03:42:04
SYMPUT is a SAS language routine that assigns value produced in a data step to a GLOBAL symbolic variable.
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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