I did some research but only find ugly hacks, which uses unique name for each array element and save the names into a list. Is there any way to do this right?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Instead of arrays, you want to use dictionaries: http://www.tcl.tk/man/tcl8.5/TclCmd/dict.htm
Dictionaries are first-class variables and can be passed around (and placed in a list) just like other variables.