由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - macro里面能还用macro吗?
相关主题
Need advice on SAS macro debugging求助,SAS ADV 130 中94
base 和advance 考试的体会怎样比较hierarchical model
[SAS]怎么快捷地删除Macro 里创建的临时dataset和macro variab求助关于似然比检验
two SAS macro questions请教做过Multiple Imputation 的牛牛们
SAS Macro 莫名现象刚过sas base,考完的几点建议
一道ADV 130 题目求一个用SPSS算multilevel logistic regression。谢谢了。
请问SAS advanced macro global 和local有没有人能贡献几个R编程的challenging的little projects?
windows下用batch submit 两个SAS code文件Experiment Design course问题
相关话题的讨论汇总
话题: macro话题: definition话题: nested话题: nest话题: processor
进入Statistics版参与讨论
1 (共1页)
h*****e
发帖数: 187
1
想在一个macro里面再用一个macro不知道可行与否?
x*****p
发帖数: 65
2
yes
D******n
发帖数: 2836
3
not good practice , but yes.

【在 h*****e 的大作中提到】
: 想在一个macro里面再用一个macro不知道可行与否?
n**m
发帖数: 156
4
why "not good practice"

【在 D******n 的大作中提到】
: not good practice , but yes.
c****o
发帖数: 69
5
why.....
looks like Im using this way a lot...

【在 D******n 的大作中提到】
: not good practice , but yes.
D******n
发帖数: 2836
6
" Avoid Nested Macro Definitions
Nesting macro definitions inside other macros is usually unnecessary and
inefficient. When you call a macro that contains a nested macro
definition,
the macro processor generates the nested macro definition as text and
places
it on the input stack. The word scanner then scans the definition and
the
macro processor compiles it. If you nest the definition of a macro that
does
not change, you cause the macro processor to compile the same macro
each
time that section of the outer macro is executed.
As a rule, you should define macros separately. If you want to nest a
macro'
s scope, simply nest the macro call, not the macro definition."
--- SAS Macro Language Reference 9.2
But if u mean invoking another macro within a macro thats totally fine.

【在 c****o 的大作中提到】
: why.....
: looks like Im using this way a lot...

s*r
发帖数: 2757
7
这个是说nested definition不好吧
但没说不能再大macro里面call小macro吧
不过macro是个很奇怪的概念,与所有编程语言都不同
通常没事,不过出了bug常常是因为把它当成其他语言的function那么用

【在 D******n 的大作中提到】
: " Avoid Nested Macro Definitions
: Nesting macro definitions inside other macros is usually unnecessary and
: inefficient. When you call a macro that contains a nested macro
: definition,
: the macro processor generates the nested macro definition as text and
: places
: it on the input stack. The word scanner then scans the definition and
: the
: macro processor compiles it. If you nest the definition of a macro that
: does

n**m
发帖数: 156
8
got it.

【在 D******n 的大作中提到】
: " Avoid Nested Macro Definitions
: Nesting macro definitions inside other macros is usually unnecessary and
: inefficient. When you call a macro that contains a nested macro
: definition,
: the macro processor generates the nested macro definition as text and
: places
: it on the input stack. The word scanner then scans the definition and
: the
: macro processor compiles it. If you nest the definition of a macro that
: does

1 (共1页)
进入Statistics版参与讨论
相关主题
Experiment Design course问题SAS Macro 莫名现象
关于实验设计的问题一道ADV 130 题目
Proc SQL 大量数据匹配的效率问题请问SAS advanced macro global 和local
统计菜鸟求统计分析方法windows下用batch submit 两个SAS code文件
Need advice on SAS macro debugging求助,SAS ADV 130 中94
base 和advance 考试的体会怎样比较hierarchical model
[SAS]怎么快捷地删除Macro 里创建的临时dataset和macro variab求助关于似然比检验
two SAS macro questions请教做过Multiple Imputation 的牛牛们
相关话题的讨论汇总
话题: macro话题: definition话题: nested话题: nest话题: processor