proc test {x} {
	global a
	upvar $x y
#	puts $y
	set $y 222
	set i [array startsearch a]
	while {[array anymore a $i]} {
		set k [array nextelement a $i]
		puts $k
	}
}

set a(1) 111
#set a(2) 222
set a(3) 333

set z 123
test z
