%let name= Ed Norton ;
%put The value of the macro variable name is: &name;
%let name2=' Ed Norton ';
%put name2 is &name2
%let title="Joan's Report";
%put quotes are included in the saved text, title is &title;
%let start=;
%put Macro variable may be assigned a null value: &start;
%let sum=3+4;
%put Macro variables contain text, including numbers, no arithmetic is done. Sum is ∑
%let total=0;
%let total=&total+∑
%put When macro variable definition included macro variables;
%put The included macro variables are "resolved" and then the definition is made;
%put total is now: &total;
Global Symbol Table | |
name | Ed Norton |
name2 | ' Ed Norton ' |
name3 | "Joan's Report" |
start | |
sum | 3+4 |
total | 0+3+4 |
... | ... |