26. The following SAS program is submitted:
%let mvar=bye;
data _null_;
var1='hi';
var2='hello';
call symput('var1' || "&mvar", var2);
run;
Which one of the following is the name of the macro variable created by the CALL SYMPUT
statement?
Correct answer: c
a. var1
b. hibye
c. var1bye
d. No macro variable is created because the CALL SYMPUT
statement is not valid.
Your answer:
The CALL SYMPUT statement in this example uses the concatenation operator to join the text
string var1 with the resolved value of the macro variable reference &mvar, which is bye.
Therefore, the name of the new macro variable is var1bye.
此题选C不选B的原因在于,"var1"是用引号quote了的,带了引号的话SAS就认为其是个字符串而不是变量,因此不会resovlve 为 hi .var1带引号就是字符串,一个具体的值,不带则是一个变量,一个变量name.
个人所吾!