proc fn1 {x} {
	upvar 1 $x y
	puts $y
}

proc fn2 {} {
	uplevel #0 {
		puts $b
	}
}

set a 123
fn1 a

set b 456
fn2

puts [list a {} b   c]
puts [concat a {} b   c]

set ar(AAA) "aaa"
set ar(BBB) "bbb"
set ar(CCC) "ccc"
set ar(DDD) "ddd"

unset ar(BBB)
puts "size = [array size ar]"

set as [array startsearch ar]
while {[array anymore ar $as]} {
	set nm [array nextelement ar $as]
	puts "$nm -> $ar($nm)"
}
array donesearch ar $as

puts [catch { open dummy } fp]
puts $fp

puts --------------------------

unset a

proc test {x} {
	global a
	upvar $x y
#	puts $y
	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 a(4) 444
set a(5) 555


test a(2)

puts ---

puts [array size a]


puts [expr 1+2*3]


#gets stdin
