h*******d 发帖数: 272 | 1 KILLTEST 关于MACRO 的一系列题 我都错了 想破脑袋还是不明白
先放3道 请大家指点我一下吧 真的真的十分感谢
78
The following is submitted:
%macro print(dsn=sashelp.class, var1,var2=name);
Proc print data=&dsn;
Var&var1&var2;
Run;
%mend;
%print(dsn=sashelp.prdsale, age name, var2=height)
What is the result?
答案: the macro variable VAR1 has no value , the macro failed to compile.
为什么不是C:the value of the macro variable VAR1 is age name.
79
The following is submitted:
%macro test;
Data out;
Set sashelp.prdsale end=final;
If predict>500 then |
A*******s 发帖数: 3942 | 2 78. Positional parameters have to be listed before keyword parameters.
79. Call Symput routine is the only way to pass a value to a macor variable
within data step in execution time. Besides, %let total=counter; or %global
total=counter; can't even retrieve the value from data-step variable. Both
can only assign the text 'counter' to macro variable total;
80.%let statement is executed before data step is executed.(Again, Call
Symput routine is the only way to pass a value to a macor variable wit |
h*******d 发帖数: 272 | 3 谢谢 :-)
又见帅宝宝新照片 爸爸妈妈也一定很好看 要多更新宝宝照片啊
variable
global
see
【在 A*******s 的大作中提到】 : 78. Positional parameters have to be listed before keyword parameters. : 79. Call Symput routine is the only way to pass a value to a macor variable : within data step in execution time. Besides, %let total=counter; or %global : total=counter; can't even retrieve the value from data-step variable. Both : can only assign the text 'counter' to macro variable total; : 80.%let statement is executed before data step is executed.(Again, Call : Symput routine is the only way to pass a value to a macor variable wit
|
A*******s 发帖数: 3942 | 4 惭愧,孩子没长开的时候大家都说像我
现在长得越来越帅了,大家都说像他妈...
【在 h*******d 的大作中提到】 : 谢谢 :-) : 又见帅宝宝新照片 爸爸妈妈也一定很好看 要多更新宝宝照片啊 : : variable : global : see
|
h*******d 发帖数: 272 | 5 hi sorry ,but请再帮我看一道题吧
82 the following is submitted:
% macro cols1;
Name age;
%mend;
%macro cols2;
Height weight;
%mend;
Proc print data=sashelp.class;
Run;
Which VAR statement successfully completes the program and produces a report
?
答案 var height%cols1;
为什么不是: Var%cols2%cols1;
really appreciate it .
【在 A*******s 的大作中提到】 : 惭愧,孩子没长开的时候大家都说像我 : 现在长得越来越帅了,大家都说像他妈...
|
A*******s 发帖数: 3942 | 6 var height %cols1 --> var height Name age;
Var %cols2 %cols1 --> var Height weight; Name age; |