diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-12-03 13:46:27 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-12-03 13:46:27 (GMT) |
commit | 629ca8e4ee0dc3109e8120b6e015b8840dc1838f (patch) | |
tree | 66a144b459981c7033d8fba61e0fbe74b8faed43 /doc/switch.n | |
parent | 23c757e1987a037c346e5d77c4997c9aaf692b9d (diff) | |
download | tcl-629ca8e4ee0dc3109e8120b6e015b8840dc1838f.zip tcl-629ca8e4ee0dc3109e8120b6e015b8840dc1838f.tar.gz tcl-629ca8e4ee0dc3109e8120b6e015b8840dc1838f.tar.bz2 |
Make two-arg switch work reliably (and actually as documented!) [Bug 1836519]
Diffstat (limited to 'doc/switch.n')
-rw-r--r-- | doc/switch.n | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/switch.n b/doc/switch.n index 62db89b..b63f402 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.15 2007/10/29 16:00:04 dkf Exp $ +'\" RCS: @(#) $Id: switch.n,v 1.16 2007/12/03 13:46:27 dkf Exp $ '\" .so man.macros .TH switch n 8.5 Tcl "Tcl Built-In Commands" @@ -85,6 +85,10 @@ time as the \fB\-matchvar\fR option. \fB\-\|\-\fR Marks the end of options. The argument following this one will be treated as \fIstring\fR even if it starts with a \fB\-\fR. +.VS 8.5 +This is not required when the matching patterns and bodies are grouped +together in a single argument. +.VE 8.5 .PP Two syntaxes are provided for the \fIpattern\fR and \fIbody\fR arguments. The first uses a separate argument for each of the patterns and commands; @@ -138,7 +142,7 @@ Whenever nothing matches, the \fBdefault\fR clause (which must be last) is taken. This example has a result of \fI3\fR: .CS \fBswitch\fR xyz { - a \- + a \- b { # Correct Comment Placement expr {1} @@ -171,3 +175,6 @@ exactly matched is easily obtained using the \fB\-matchvar\fR option: for(n), if(n), regexp(n) .SH KEYWORDS switch, match, regular expression +.\" Local Variables: +.\" mode: nroff +.\" End: |