diff options
Diffstat (limited to 'doc/array.n')
-rw-r--r-- | doc/array.n | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/array.n b/doc/array.n index 37d3fb9..969d013 100644 --- a/doc/array.n +++ b/doc/array.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: array.n,v 1.10 2003/07/15 22:17:06 dkf Exp $ +'\" RCS: @(#) $Id: array.n,v 1.11 2003/07/15 22:21:26 dkf Exp $ '\" .so man.macros .TH array n 8.3 Tcl "Tcl Built-In Commands" @@ -164,6 +164,14 @@ foreach color [array names colorcount] { Color: green Count: 5 Color: red Count: 1 +foreach color [lsort [array names colorcount]] { + puts "Color: $color Count: $colorcount($color)" +} + => Color: blue Count: 4 + Color: green Count: 5 + Color: red Count: 1 + Color: white Count: 9 + array statistics colorcount => 4 entries in table, 4 buckets number of buckets with 0 entries: 1 |