How to initialize an array in Tcl? -


What is the proper way to start an empty array in TCL?

I have the following code (simplified):

  proc parseFile {filename results_array} {upvar $ results_array result set result (key) $ value} set r1 {} parseFile "Filename" r1  

and I get the error:

Error: "Result (key)" can not be set: variable is not the array < / P>

You do not start the arrays in TCL, when you set up a member They look like:

  proc stash {key array_name}} {upvar $ array_name one set ( $ Key} $ value} stash one pvr 1 hide two PVR 2 array name PVR  

yield:

  two one  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -