summaryrefslogtreecommitdiffstats
path: root/doc/switch.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/switch.n')
-rw-r--r--doc/switch.n11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/switch.n b/doc/switch.n
index fb7ac60..c454a3d 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.3 1999/06/24 21:15:14 jpeek Exp $
+'\" RCS: @(#) $Id: switch.n,v 1.4 1999/09/21 04:20:36 hobbs Exp $
'\"
.so man.macros
.TH switch n 7.0 Tcl "Tcl Built-In Commands"
@@ -75,6 +75,10 @@ then the body after that is used, and so on).
This feature makes it possible to share a single \fIbody\fR among
several patterns.
.PP
+Beware of how you place comments in \fBswitch\fR commands. Comments
+should only be placed \fBinside\fR the execution body of one of the
+patterns, and not intermingled with the patterns.
+.PP
Below are some examples of \fBswitch\fR commands:
.CS
\fBswitch\0abc\0a\0\-\0b\0{format 1}\0abc\0{format 2}\0default\0{format 3}\fR
@@ -94,7 +98,10 @@ will return \fB1\fR, and
a
\-
b
- {format 1}
+ {
+ # Correct Comment Placement
+ format 1
+ }
a*
{format 2}
default