Forum OpenACS Development: Re: uplevel with passed variables

Posted by Tom Jackson on
You can't do that. Uplevel runs the code in a different environment (usually). What you might try is upvar:

set var "test"

proc my_proc {myVar} {

  upvar $myVar myLocalVar
  puts "myVar is '$myVar' value is '$myLocalVar'"


set var "test"

# pass in name of var, not value of var:

my_proc "var"

# should output "myVar is 'var' value is 'test'"