summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2004-05-24 19:18:03 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2004-05-24 19:18:03 (GMT)
commit5d8ab9672cd4860dc923d1999563e0c97ff1cf13 (patch)
treefbbe6c28133e356fd8292c53f0a38f8009847cb9
parent15ce244d92a3787a27d29ff4f68c3fbbda8c1b8b (diff)
downloadtcl-5d8ab9672cd4860dc923d1999563e0c97ff1cf13.zip
tcl-5d8ab9672cd4860dc923d1999563e0c97ff1cf13.tar.gz
tcl-5d8ab9672cd4860dc923d1999563e0c97ff1cf13.tar.bz2
* doc/set.n: accurate description of name resolution process,
referring to namespace.n for details [Bug 959180]
-rw-r--r--ChangeLog5
-rw-r--r--doc/set.n28
2 files changed, 18 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ff4828..b0cbb46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-24 Miguel Sofer <msofer@users.sf.net>
+
+ * doc/set.n: accurate description of name resolution process,
+ referring to namespace.n for details [Bug 959180]
+
2004-05-23 Miguel Sofer <msofer@users.sf.net>
* generic/tclNamesp.c (Tcl_FindNamespaceVar): [Bug 959052] fixed,
diff --git a/doc/set.n b/doc/set.n
index c5bc059..76d7b99 100644
--- a/doc/set.n
+++ b/doc/set.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: set.n,v 1.4 2004/04/30 22:45:56 dkf Exp $
+'\" RCS: @(#) $Id: set.n,v 1.5 2004/05/24 19:18:05 msofer Exp $
'\"
.so man.macros
.TH set n "" Tcl "Tcl Built-In Commands"
@@ -28,21 +28,19 @@ close parenthesis, then it refers to an array element: the characters
before the first open parenthesis are the name of the array,
and the characters between the parentheses are the index within the array.
Otherwise \fIvarName\fR refers to a scalar variable.
-Normally, \fIvarName\fR is unqualified
-(does not include the names of any containing namespaces),
-and the variable of that name in the current namespace is read or written.
+.PP
If \fIvarName\fR includes namespace qualifiers
-(in the array name if it refers to an array element),
-the variable in the specified namespace is read or written.
+(in the array name if it refers to an array element), or if \fIvarName\fR
+is unqualified (does not include the names of any containing namespaces)
+but no procedure is active,
+\fIvarName\fR refers to a namespace variable
+resolved according to the rules described under \fBNAME RESOLUTION\fR in
+the \fBnamespace\fR manual page.
.PP
-If no procedure is active,
-then \fIvarName\fR refers to a namespace variable
-(global variable if the current namespace is the global namespace).
-If a procedure is active, then \fIvarName\fR refers to a parameter
-or local variable of the procedure unless the \fBglobal\fR command
-was invoked to declare \fIvarName\fR to be global,
-or unless a \fBvariable\fR command
-was invoked to declare \fIvarName\fR to be a namespace variable.
+If a procedure is active and \fIvarName\fR is unqualified, then
+\fIvarName\fR refers to a parameter or local variable of the procedure,
+unless \fIvarName\fR was declared to resolve differently through one of the
+\fBglobal\fR, \fBvariable\fR or \fBupvar\fR commands.
.SH EXAMPLES
Store a random number in the variable \fIr\fR:
.CS
@@ -71,7 +69,7 @@ set out [set $vbl]
.CE
.SH "SEE ALSO"
-expr(n), proc(n), trace(n), unset(n)
+expr(n), global(n), namespace(n), proc(n), trace(n), unset(n), upvar(n), variable(n)
.SH KEYWORDS
read, write, variable