Saved Bookmarks
| 1. |
How Are Parameters Passed To A Macro? |
|
Answer» A macro variable defined in PARENTHESES in a %MACRO statement is a macro PARAMETER. Macro parameters allow you to pass information into a macro. Here is a simple example: %macro plot (yvar= ,xvar= ); proc plot; plot &yvar*&xvar; run; %MEND plot; %plot(age,sex) A macro variable defined in parentheses in a %MACRO statement is a macro parameter. Macro parameters allow you to pass information into a macro. Here is a simple example: %macro plot (yvar= ,xvar= ); proc plot; plot &yvar*&xvar; run; %mend plot; %plot(age,sex) |
|