summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorericm <ericm>2000-05-31 15:03:33 (GMT)
committerericm <ericm>2000-05-31 15:03:33 (GMT)
commitfb987e05c7e3613f4a27e0f9262e29cbda36e51a (patch)
tree4cfa67e5a1c015cdda900b630930eca88d75bf28 /doc
parent15694426fe8aee1201ebb7357f86aafb07fad4fd (diff)
downloadtcl-fb987e05c7e3613f4a27e0f9262e29cbda36e51a.zip
tcl-fb987e05c7e3613f4a27e0f9262e29cbda36e51a.tar.gz
tcl-fb987e05c7e3613f4a27e0f9262e29cbda36e51a.tar.bz2
* generic/tclVar.c (Tcl_ArrayObjCmd): Added support for regexp and
exact matching for [array names] command. [RFE: 3684]. * doc/array.n: Added documentation for [array names -exact/-regexp/-glob] [RFE: 3684]. * tests/set-old.test: Added tests for [array names -exact/-regexp/-glob] [RFE: 3684].
Diffstat (limited to 'doc')
-rw-r--r--doc/array.n20
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/array.n b/doc/array.n
index 0f31196..ff610cd 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.6 2000/05/23 02:45:21 hobbs Exp $
+'\" RCS: @(#) $Id: array.n,v 1.7 2000/05/31 15:03:34 ericm Exp $
'\"
.so man.macros
.TH array n 8.3 Tcl "Tcl Built-In Commands"
@@ -63,15 +63,19 @@ match \fIpattern\fR (using the matching rules of
If \fIarrayName\fR isn't the name of an array variable, or if
the array contains no elements, then an empty list is returned.
.TP
-\fBarray names \fIarrayName\fR ?\fIpattern\fR?
+\fBarray names \fIarrayName\fR ?\fImode\fR? ?\fIpattern\fR?
Returns a list containing the names of all of the elements in
-the array that match \fIpattern\fR (using the matching
-rules of \fBstring match\fR).
+the array that match \fIpattern\fR. \fIMode\fR may be one of
+\fB-exact\fR, \fB-glob\fR, or \fB-regexp\fR. If specified, \fImode\fR
+designates which matching rules to use to match \fIpattern\fR against
+the names of the elements in the array. If not specified, \fImode\fR
+defaults to \fB-glob\fR. See the documentation for \fBstring match\fR
+for information on glob style matching, and the documentation for
+\fBregexp\fR for information on regexp matching.
If \fIpattern\fR is omitted then the command returns all of
-the element names in the array.
-If there are no (matching) elements in the array, or if \fIarrayName\fR
-isn't the name of an array variable, then an empty string is
-returned.
+the element names in the array. If there are no (matching) elements
+in the array, or if \fIarrayName\fR isn't the name of an array
+variable, then an empty string is returned.
.TP
\fBarray nextelement \fIarrayName searchId\fR
Returns the name of the next element in \fIarrayName\fR, or