由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 问个sas adv的问题
相关主题
SAS macro variable resolution question[合集] 问个SAS的问题
大家说说这是电脑的错还是SAS的错继续问个MACRO VARIABLE问题。。。
Help: SAS code问个sas coding问题
SAS macro Debug问个 UNIX 系统下的Sas Macro问题
与Macro相关的字符函数靠,这个哪错了?
SAS Macro 问题请教 。。。sas question!!!
请教个&的问题为啥我的宏不被解释--SYMBOLGEN
SAS help : The scope of macro variables一个关于macro的问题,多谢。
相关话题的讨论汇总
话题: displays话题: symbolgen话题: resolves话题: test话题: what
进入Statistics版参与讨论
1 (共1页)
n**m
发帖数: 156
1
我以为6个&的时候会变成three,但是事实上是7个&的时候才变,什么原因呢?
%let test = one;
%let one = two;
%let two = three;
%let three = last;
%put what displays is &test;
%put what displays is &&test;
%put what displays is &&&test;
%put what displays is &&&&test;
%put what displays is &&&&&test;
%put what displays is &&&&&&test;
%put what displays is &&&&&&&test;
n**m
发帖数: 156
2
咦,4个&的时候是one又是什么道理的?
308 %put what displays is &test;
what displays is one
309 %put what displays is &&test;
what displays is one
310 %put what displays is &&&test;
what displays is two
311 %put what displays is &&&&test;
what displays is one
312 %put what displays is &&&&&test;
what displays is two
313 %put what displays is &&&&&&test;
what displays is two
314 %put what displays is &&&&&&&test;
what displays is three
P****D
发帖数: 11146
3
你自己看log不就都解决了么?总之就是碰见两个&的时候自动变成一个。
441 %let test = one;
442 %let one = two;
443 %let two = three;
444 %let three = last;
445 %put what displays is &test;
SYMBOLGEN: Macro variable TEST resolves to one
what displays is one
446 %put what displays is &&test;
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable TEST resolves to one
what displays is one
447 %put what displays is &&&test;
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable TEST resolves to one
SYMBOLGEN: Macro variable ONE resolves to two
what displays is two
448 %put what displays is &&&&test;
SYMBOLGEN: && resolves to &.
SYMBOLGEN: && resolves to &.
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable TEST resolves to one
what displays is one
449 %put what displays is &&&&&test;
SYMBOLGEN: && resolves to &.
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable TEST resolves to one
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable ONE resolves to two
what displays is two
450 %put what displays is &&&&&&test;
SYMBOLGEN: && resolves to &.
SYMBOLGEN: && resolves to &.
SYMBOLGEN: && resolves to &.
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable TEST resolves to one
SYMBOLGEN: Macro variable ONE resolves to two
what displays is two
451 %put what displays is &&&&&&&test;
SYMBOLGEN: && resolves to &.
SYMBOLGEN: && resolves to &.
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable TEST resolves to one
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable ONE resolves to two
SYMBOLGEN: Macro variable TWO resolves to three
what displays is three
n**m
发帖数: 156
4
我明白了,多谢,没养成用symbolgen的习惯。
1 (共1页)
进入Statistics版参与讨论
相关主题
一个关于macro的问题,多谢。与Macro相关的字符函数
急问:SAS batch submission with macro variableSAS Macro 问题请教 。。。
Re: SAS help : How to use Macro to select procedurs请教个&的问题
sas 中如何给一个variable 加密?SAS help : The scope of macro variables
SAS macro variable resolution question[合集] 问个SAS的问题
大家说说这是电脑的错还是SAS的错继续问个MACRO VARIABLE问题。。。
Help: SAS code问个sas coding问题
SAS macro Debug问个 UNIX 系统下的Sas Macro问题
相关话题的讨论汇总
话题: displays话题: symbolgen话题: resolves话题: test话题: what