summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--doc/switch.n11
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f4c5b72..d462779 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-03-21 Donal K. Fellows <dkf@users.sf.net>
+ * doc/switch.n: Clarified documentation in respect of two-argument
+ invokation. [Bug 1899962]
+
* tests/switch.test: Added more tests of regexp-mode compilation of
the [switch] command. [Bug 1854435]
diff --git a/doc/switch.n b/doc/switch.n
index 0116f62..13edde8 100644
--- a/doc/switch.n
+++ b/doc/switch.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: switch.n,v 1.17 2007/12/13 15:22:33 dgp Exp $
+'\" RCS: @(#) $Id: switch.n,v 1.18 2008/03/21 19:22:31 dkf Exp $
'\"
.so man.macros
.TH switch n 8.5 Tcl "Tcl Built-In Commands"
@@ -32,8 +32,13 @@ matches \fIstring\fR and no default is given, then the \fBswitch\fR
command returns an empty string.
.PP
If the initial arguments to \fBswitch\fR start with \fB\-\fR then
-they are treated as options. The following options are
-currently supported:
+they are treated as options
+.VS 8.5
+unless there are exactly two arguments to \fBswitch\fR (in which case the
+first must the \fIstring\fR and the second must be the
+\fIpattern\fR/\fIbody\fR list).
+.VE 8.5
+The following options are currently supported:
.TP 10
\fB\-exact\fR
Use exact matching when comparing \fIstring\fR to a pattern. This