From 5524a7bbef637a5dfd39cf199e79efae784204e8 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 27 Apr 2009 12:35:01 +0000 Subject: Fix examples. [Bug 2780680] --- ChangeLog | 10 ++++++++-- doc/concat.n | 42 +++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e3d40f..1e9c9c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,13 @@ +2009-04-27 Donal K. Fellows + + * doc/concat.n (EXAMPLES): [Bug 2780680]: Rewrote so that the spacing + of result messages is correct. (The exact way they were wrong was + different when rendered through groff or as HTML, but it was still + wrong both ways.) + 2009-04-24 Stuart Cassoff - * unix/Makefile.in: Don't chmod/exec installManPage. - [Patch 2769530] + * unix/Makefile.in: [Patch 2769530]: Don't chmod/exec installManPage. 2009-04-15 Don Porter diff --git a/doc/concat.n b/doc/concat.n index c54f662..2ebcb63 100644 --- a/doc/concat.n +++ b/doc/concat.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: concat.n,v 1.11 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: concat.n,v 1.11.2.1 2009/04/27 12:35:01 dkf Exp $ '\" .so man.macros .TH concat n 8.3 Tcl "Tcl Built-In Commands" @@ -26,33 +26,33 @@ into a single list. It permits any number of arguments; if no \fIarg\fRs are supplied, the result is an empty string. .SH EXAMPLES -Although \fBconcat\fR will concatenate lists (so the command: +Although \fBconcat\fR will concatenate lists, flattening them in the process +(so giving the following interactive session): +.PP .CS -\fBconcat\fR a b {c d e} {f {g h}} +\fI%\fR \fBconcat\fR a b {c d e} {f {g h}} +\fIa b c d e f {g h}\fR .CE -will return -.QW "\fBa b c d e f {g h}\fR" -as its result), it will also -concatenate things that are not lists, and hence the command: +.PP +it will also concatenate things that are not lists, as can be seen from this +session: +.PP .CS -\fBconcat\fR " a b {c " d " e} f" +\fI%\fR \fBconcat\fR " a b {c " d " e} f" +\fIa b {c d e} f\fR .CE -will return -.QW "\fBa b {c d e} f\fR" -as its result. .PP -Note that the concatenation does not remove spaces from the middle of -its arguments, so the command: +Note also that the concatenation does not remove spaces from the middle of +values, as can be seen here: +.PP .CS -\fBconcat\fR "a b c" { d e f } +\fI%\fR \fBconcat\fR "a b c" { d e f } +\fIa b c d e f\fR .CE -will return -.QW "\fBa b c d e f\fR" -(i.e. with three spaces between -the \fBa\fR, the \fBb\fR and the \fBc\fR). - +.PP +(i.e., there are three spaces between each of the \fBa\fR, the \fBb\fR and the +\fBc\fR). .SH "SEE ALSO" -append(n), eval(n) - +append(n), eval(n), join(n) .SH KEYWORDS concatenate, join, lists -- cgit v0.12