summaryrefslogtreecommitdiffstats
path: root/doc/lappend.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-04-16 22:20:55 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-04-16 22:20:55 (GMT)
commit52abe65a5f5579fb24ba16793f367efdca4b216d (patch)
tree515875301b5f35918e582aa3d36cef09b4824dce /doc/lappend.n
parent79f407d4f411f9c26a8fb3bbda9c76112b7f444e (diff)
downloadtcl-52abe65a5f5579fb24ba16793f367efdca4b216d.zip
tcl-52abe65a5f5579fb24ba16793f367efdca4b216d.tar.gz
tcl-52abe65a5f5579fb24ba16793f367efdca4b216d.tar.bz2
Add more examples to documentation along the lines of David Welton's project.
Diffstat (limited to 'doc/lappend.n')
-rw-r--r--doc/lappend.n14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/lappend.n b/doc/lappend.n
index 6a0d9bc..90cf6f9 100644
--- a/doc/lappend.n
+++ b/doc/lappend.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lappend.n,v 1.6 2001/11/14 23:38:39 hobbs Exp $
+'\" RCS: @(#) $Id: lappend.n,v 1.7 2004/04/16 22:20:58 dkf Exp $
'\"
.so man.macros
.TH lappend n "" Tcl "Tcl Built-In Commands"
@@ -32,6 +32,18 @@ large lists. For example, ``\fBlappend a $b\fR'' is much
more efficient than ``\fBset a [concat $a [list $b]]\fR'' when
\fB$a\fR is long.
+.SH EXAMPLE
+Using \fBlappend\fR to build up a list of numbers.
+
+.CS
+% set var 1
+1
+% lappend var 2
+1 2
+% lappend var 3 4 5
+1 2 3 4 5
+.CE
+
.SH "SEE ALSO"
list(n), lindex(n), linsert(n), llength(n),
.VS 8.4