Forum OpenACS Development: Re: uplevel with passed variables

Collapse
Posted by Tom Jackson on

If you run:


myProc "var"

#The result will be the same as executing:

Some Code using X_var

You can try to pass things into the uplevel, but it will never work. Your proc would have the same effect if it were written:

ad_proc -public myProc {} {} {        
    uplevel {
        Some Code Using X_var
    }
}
Collapse
Posted by Nis Jørgensen on
Samer, your example works fine with me. For instance:

ad_proc -public myProc {Var} {} {
        upvar X_var vv_var
        set vv_var $Var
        uplevel {
          set Y_var "${X_var}bar"
        }
}

myProc "foo"
set Y_var


returns "foobar" just as it should.