summaryrefslogtreecommitdiffstats
path: root/doc/source.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source.n')
-rw-r--r--doc/source.n15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/source.n b/doc/source.n
index 9bbe7ce..c936d71 100644
--- a/doc/source.n
+++ b/doc/source.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: source.n,v 1.8 2004/03/17 18:45:49 das Exp $
+'\" RCS: @(#) $Id: source.n,v 1.9 2004/05/28 12:59:01 dkf Exp $
'\"
.so man.macros
.TH source n "" Tcl "Tcl Built-In Commands"
@@ -46,6 +46,19 @@ The \fB-encoding\fR option is used to specify the encoding of
the data stored in \fIfileName\fR. When the \fB-encoding\fR option
is omitted, the system encoding is assumed.
.VE 8.5
+.SH EXAMPLE
+Run the script in the file \fBfoo.tcl\fR and then the script in the
+file \fBbar.tcl\fR:
+.CS
+source foo.tcl
+source bar.tcl
+.CE
+Alternatively:
+.CS
+foreach scriptFile {foo.tcl bar.tcl} {
+ source $scriptFile
+}
+.CE
.SH "SEE ALSO"
file(n), cd(n), encoding(n)