What is the proper way to initialize an empty array in Tcl?
I have the following code (simplified):
proc parseFile {filename results_array} {
upvar $results_array results
set results(key) $value
}
set r1 {}
parseFile "filename" r1
and I get the error:
Error: can't set "results(key)": variable isn't array