只是使用
global sink
(全球只是一个特别的 upvar
案子)
结束的变量 (...)
是(关联的)数组,不建议使用数字作为键,最好使用列表,例如
set mylist {}
# append some elements
lappend mylist "foo" "bar" "baz"
# get the 2nd element
puts [lindex $mylist 1]
# set the 3rd element to "Hello World"
lset mylist 2 "Hello World"