由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - a sas adv question
相关主题
一个关于macro的问题,多谢。请教一个macro的问题
请教一个SAS ADV 的题目proc iml help!
请教一个SAS Macro问题。谢谢SAS ADVANCED 一道题求助
How to the macro regression with if?SAS call symput question
macro variable 的问题请教一道SAS maro的题
how to make this macro work, thanks请教SAS adv 题库一道macro题
SAS Regression Macro 问题请教 (有包子)一个常见的问题
一道ADV 130 题目question about using sas macro variable and do loop
相关话题的讨论汇总
话题: macro话题: let话题: dog话题: animal话题: cat
进入Statistics版参与讨论
1 (共1页)
x******n
发帖数: 173
1
8 %let a=cat;
9
10 %macro animal(a=frog);
11 %let a=dog;
12 %mend;
13 %animal(a=pig)
14 %put a is &a;
a is cat
15 %let a=cat;
16
17 %macro animal;
18 %let a=dog;
19 %mend;
20 %animal
21 %put a is &a;
a is dog;
why the results from the two programs are different? Thanks.
w***z
发帖数: 28
2
in first macro, a is local
%let a=dog;
inside the macro will only update the local variable a.
in the second macro, as there is no variable a in the local table
%let a=dog;
inside the macro will update a in the globle table...
x******n
发帖数: 173
3
get it thanks

【在 w***z 的大作中提到】
: in first macro, a is local
: %let a=dog;
: inside the macro will only update the local variable a.
: in the second macro, as there is no variable a in the local table
: %let a=dog;
: inside the macro will update a in the globle table...

1 (共1页)
进入Statistics版参与讨论
相关主题
question about using sas macro variable and do loopmacro variable 的问题
问一些sas的问题how to make this macro work, thanks
求教sas adv题目SAS Regression Macro 问题请教 (有包子)
请教SAS ADV 50 中的一道简单macro题目一道ADV 130 题目
一个关于macro的问题,多谢。请教一个macro的问题
请教一个SAS ADV 的题目proc iml help!
请教一个SAS Macro问题。谢谢SAS ADVANCED 一道题求助
How to the macro regression with if?SAS call symput question
相关话题的讨论汇总
话题: macro话题: let话题: dog话题: animal话题: cat