summaryrefslogtreecommitdiffstats
path: root/doc/lsearch.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-09-29 12:25:18 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-09-29 12:25:18 (GMT)
commitda82965bf2c1b65b3e1bb8e1f82e944317f0a047 (patch)
tree12a60c58fdc32b0745cb3420d12a25e183777e35 /doc/lsearch.n
parent883a79a9d4ece9f76dbbcd5a9b7e8c6e5bd43b57 (diff)
downloadtcl-da82965bf2c1b65b3e1bb8e1f82e944317f0a047.zip
tcl-da82965bf2c1b65b3e1bb8e1f82e944317f0a047.tar.gz
tcl-da82965bf2c1b65b3e1bb8e1f82e944317f0a047.tar.bz2
TIP #313 IMPLEMENTATION
Diffstat (limited to 'doc/lsearch.n')
-rw-r--r--doc/lsearch.n16
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/lsearch.n b/doc/lsearch.n
index b5f950d..cd4363d 100644
--- a/doc/lsearch.n
+++ b/doc/lsearch.n
@@ -7,10 +7,10 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lsearch.n,v 1.35 2008/06/29 22:28:24 dkf Exp $
+'\" RCS: @(#) $Id: lsearch.n,v 1.36 2008/09/29 12:25:22 dkf Exp $
'\"
.so man.macros
-.TH lsearch n 8.5 Tcl "Tcl Built-In Commands"
+.TH lsearch n 8.6 Tcl "Tcl Built-In Commands"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
@@ -134,6 +134,17 @@ meaningful when used with \fB\-sorted\fR.
.
The list elements are sorted in increasing order. This option is only
meaningful when used with \fB\-sorted\fR.
+.TP
+\fB\-bisect\fR
+.VS 8.6
+Inexact search when the list elements are in sorted order. For an increasing
+list the last index where the element is less than or equal to the pattern
+is returned. For a decreasing list the last index where the element is greater
+than or equal to the pattern is returned. If the pattern is before the first
+element or the list is empty, -1 is returned.
+This option implies \fB\-sorted\fR and cannot be used with either \fB\-all\fR
+or \fB\-not\fR.
+.VE 8.6
.SS "NESTED LIST OPTIONS"
.PP
These options are used to search lists of lists. They may be used
@@ -199,6 +210,7 @@ foreach(n), list(n), lappend(n), lindex(n), linsert(n), llength(n),
lset(n), lsort(n), lrange(n), lreplace(n),
string(n)
.SH KEYWORDS
+binary search, linear search,
list, match, pattern, regular expression, search, string
'\" Local Variables:
'\" mode: nroff