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的习惯。 |