Tcl Source Code

Artifact [9a9155c9ad]
Login

Artifact 9a9155c9adbb019a8212e84d67824cc206243b04:

Attachment "setn.patch" to ticket [959180ffff] added by msofer 2004-05-24 16:39:40.
? generic/tclExecute.c.HEAD
? generic/tclObj.c.ORIG
? generic/tclProc.c.ORIG
? unix/.log
? unix/.ofl
? unix/ERR
? unix/dltest.marker
? unix/httpd_18808
? unix/httpd_6241
? unix/tclsh-head
? unix/tclsh-new
? unix/tclsh-noStart0
? unix/tclsh-noStart1
? unix/x.log
? unix/x.ofl
Index: doc/set.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/set.n,v
retrieving revision 1.4
diff -u -r1.4 set.n
--- doc/set.n	30 Apr 2004 22:45:56 -0000	1.4
+++ doc/set.n	24 May 2004 09:37:55 -0000
@@ -28,21 +28,19 @@
 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 @@
 .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