'''array get''' ''arrayName ?pattern?'' Returns a list containing pairs of elements. The first element in each pair is the name of an element in ''arrayName'' and the second element of each pair is the value of the array element. The order of the pairs is undefined. If ''pattern'' is not specified, then all of the elements of the array are included in the result. If ''pattern'' is specified, then only those elements whose names match ''pattern'' (using the matching rules of '''[string match]''') are included. If ''arrayName'' isn't the name of an array variable, or if the array contains no elements, then an empty list is returned. ---- Have a look at Apple Macintosh and Tcl ''Huh?'' ---- [RR] 12/29/03 It is very likely obvious to even moderately experienced Tcl'rs how to sort the return from "array get" in indexed order but the following might be useful to novices: proc iSort {listin} { foreach {a b} $listin {lappend lout "$a $b"} return [lsort $lout] } The elements of the list returned by "array get", as stated above, alternate between element name and element value in the array. Regardless of the dimension of the array, the element name is a single list element containing the index (like: "0", or "a,b,c", or "month,day"). They come out of "array get" in any and every order imaginable, but always as {elementName elementValue} pairs. To make them more readable, sublist them into those pairs and sort the "super-list" ---- See also: * [array] * [array set] * [set] ---- [Tcl syntax help] - [Category Command] - [Category Introspection]