diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2003-07-15 22:21:26 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2003-07-15 22:21:26 (GMT) |
commit | da4f00b003469298b4cdf2bd2f0ab8646e2ec8ba (patch) | |
tree | 4d009d86383185b421092c7480a42c2519fee316 /doc/array.n | |
parent | 20ea9381db22c4847c529063fcee0cc423c4633a (diff) | |
download | tcl-da4f00b003469298b4cdf2bd2f0ab8646e2ec8ba.zip tcl-da4f00b003469298b4cdf2bd2f0ab8646e2ec8ba.tar.gz tcl-da4f00b003469298b4cdf2bd2f0ab8646e2ec8ba.tar.bz2 |
D'oh! Forgot one of the examples...
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 |