summaryrefslogtreecommitdiffstats
path: root/doc/switch.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-10-29 16:00:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-10-29 16:00:04 (GMT)
commita4b2c1d2ba4fc6da549e05f71fad66595cec36eb (patch)
treee5729f080f84b8d474e7642120fba15b82ef33a8 /doc/switch.n
parent18476c905183d0b6cfbac7a85e8543265cf9fae0 (diff)
downloadtcl-a4b2c1d2ba4fc6da549e05f71fad66595cec36eb.zip
tcl-a4b2c1d2ba4fc6da549e05f71fad66595cec36eb.tar.gz
tcl-a4b2c1d2ba4fc6da549e05f71fad66595cec36eb.tar.bz2
Minor fixes
Diffstat (limited to 'doc/switch.n')
-rw-r--r--doc/switch.n7
1 files changed, 2 insertions, 5 deletions
diff --git a/doc/switch.n b/doc/switch.n
index 554eb6f..62db89b 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.14 2007/10/29 01:42:19 dkf Exp $
+'\" RCS: @(#) $Id: switch.n,v 1.15 2007/10/29 16:00:04 dkf Exp $
'\"
.so man.macros
.TH switch n 8.5 Tcl "Tcl Built-In Commands"
@@ -18,7 +18,6 @@ switch \- Evaluate one of several scripts, depending on a given value
.sp
\fBswitch \fR?\fIoptions\fR?\fI string \fR{\fIpattern body \fR?\fIpattern body \fR...?}
.BE
-
.SH DESCRIPTION
.PP
The \fBswitch\fR command matches its \fIstring\fR argument against each of
@@ -157,7 +156,7 @@ last) is taken. This example has a result of \fI3\fR:
When matching against regular expressions, information about what
exactly matched is easily obtained using the \fB\-matchvar\fR option:
.CS
-\fBswitch\fR -regexp -matchvar foo -- $bar {
+\fBswitch\fR \-regexp \-matchvar foo \-\- $bar {
a(b*)c {
puts "Found [string length [lindex $foo 1]] 'b's"
}
@@ -168,9 +167,7 @@ exactly matched is easily obtained using the \fB\-matchvar\fR option:
}
.CE
.VE 8.5
-
.SH "SEE ALSO"
for(n), if(n), regexp(n)
-
.SH KEYWORDS
switch, match, regular expression