Posted to tcl by de at Sat Jan 28 00:46:59 GMT 2017view raw
- proc aset {var key value} {
- upvar 1 $var array
- set array($key) $value
- }
- proc dset {var key value} {
- upvar 1 $var dict
- dict set dict $key $value
- }
- array set a {}
- aset a b c
- puts $a(b)
- set one [dict create]
- dset one two three
- puts [dict get $one two]