Hi Carl,
as I understand it, global variables should be declared with
"var" OUTSIDE any macro.
so, you can have:
var x;
macro 'test' {
   x=10;
   f();
   print (x);
   exit("Terminating normally...");
}
function f(){
     x = 20;
}
Michael
________________________________________________________________
On 17 Sep 2008, at 14:54, Carl Sebeny wrote:
> Why does the following macro code display the result
> of 10 instead of 20?
>
> var x;
> x=10;
> f();
> print (x);
> exit("Terminating normally...");
> function f(){
>     x = 20;
> }