Wednesday, July 1, 2009

%LOCAL secrete

When programming, we always put the %LOCAL and %GLOBAL statement at the top of macro definition.

Why?
In this way, we can guarant that same LOCAL/GLOBAL mv is always in effect in macro execution. If %LOCAL is in the middle, the global mv is probably in use.


*%LOCAL secrete sample;
%let test = global;
%macro test();
%put Before %nrstr(%local): "&test";

%local test;
%put After %nrstr(%local): "&test";
%mend;

%test()

No comments: