Thursday, September 14, 2006

Tcl - How to pass arrays

from wiki: (http://wiki.tcl.tk/3262) and newsgroups.

Tcl does not provide a way to simply pass arrays by value, as this is usually done for strings. Straigh forward way to go around this problem is to convert an array to list and pass it as list. Another method is to use upvar to pass variable by name. Some other methods are mentioned below: