summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-11-16 10:06:58 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-11-16 10:06:58 (GMT)
commite9478201fbdb3219530e01eb919812bc881e70ce (patch)
treea6553cb82bf0bc37c6206370710527ea7e4b31d6
parentef4ea32ff458299a15f8182f61c7ae90ab0ca178 (diff)
downloadtcl-e9478201fbdb3219530e01eb919812bc881e70ce.zip
tcl-e9478201fbdb3219530e01eb919812bc881e70ce.tar.gz
tcl-e9478201fbdb3219530e01eb919812bc881e70ce.tar.bz2
Backport of [Patch 1065732]
-rw-r--r--ChangeLog5
-rw-r--r--doc/tclvars.n31
2 files changed, 34 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b4e173c..fec6636 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-16 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * doc/tclvars.n: Mention global variables set by tclsh and wish so
+ they are easier to find. [Patch 1065732]
+
2004-11-15 Don Porter <dgp@users.sourceforge.net>
* generic/tclCmdMZ.c (Tcl_TraceObjCmd): Fixed Bug 1065378 which failed
diff --git a/doc/tclvars.n b/doc/tclvars.n
index f3c58f4..532fb5c 100644
--- a/doc/tclvars.n
+++ b/doc/tclvars.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: tclvars.n,v 1.13.2.1 2004/10/27 14:43:14 dkf Exp $
+'\" RCS: @(#) $Id: tclvars.n,v 1.13.2.2 2004/11/16 10:07:00 dkf Exp $
'\"
.so man.macros
.TH tclvars n 8.0 Tcl "Tcl Built-In Commands"
@@ -404,9 +404,36 @@ incompatibilities and changes to \fIy\fR represent small enhancements and
bug fixes that retain backward compatibility.
The value of this variable is returned by the \fBinfo tclversion\fR
command.
+.SH "OTHER GLOBAL VARIABLES"
+The following variables are only guaranteed to exist in \fBtclsh\fR
+and \fBwish\fR executables; the Tcl library does not define them
+itself but many Tcl environments do.
+.TP 6
+\fBargc\fR
+The number of arguments to \fBtclsh\fR or \fBwish\fR.
+.TP 6
+\fBargv\fR
+Tcl list of arguments to \fBtclsh\fR or \fBwish\fR.
+.TP 6
+\fBargv0\fR
+The script that \fBtclsh\fR or \fBwish\fR started executing (if it was
+specified) or otherwise the name by which \fBtclsh\fR or \fBwish\fR
+was invoked.
+.TP 6
+\fBtcl_interactive\fR
+Contains 1 if \fBtclsh\fR or \fBwish\fR is running interactively (no
+script was specified and standard input is a terminal-like device), 0
+otherwise.
+.PP
+The \fBwish\fR executably additionally specifies the following global
+variable:
+.TP 6
+\fBgeometry\fR
+If set, contains the user-supplied geometry specification to use for
+the main Tk window.
.SH "SEE ALSO"
-eval(n)
+eval(n), tclsh(1), wish(1)
.SH KEYWORDS
arithmetic, bytecode, compiler, error, environment, POSIX, precision, subprocess, variables