diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2004-04-28 13:11:28 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2004-04-28 13:11:28 (GMT) |
commit | 74c3e73d8d217092ccc418bd990bf43f9d8890ce (patch) | |
tree | 81765be95085309d4c8abe150311d739005cb45c /doc | |
parent | 25b3a8473ed731844f2c5f093d1156a80c82e848 (diff) | |
download | tcl-74c3e73d8d217092ccc418bd990bf43f9d8890ce.zip tcl-74c3e73d8d217092ccc418bd990bf43f9d8890ce.tar.gz tcl-74c3e73d8d217092ccc418bd990bf43f9d8890ce.tar.bz2 |
* doc/global.n:
* doc/upvar.n:
* generic/tclVar.c (ObjMakeUpvar):
* tests/upvar.test (upvar-8.11):
* tests/var.test (var-3.11): Avoid creation of unusable variables:
[Bug 600812] [TIP 184].
Diffstat (limited to 'doc')
-rw-r--r-- | doc/global.n | 6 | ||||
-rw-r--r-- | doc/upvar.n | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/doc/global.n b/doc/global.n index d4fd4c0..f8e502e 100644 --- a/doc/global.n +++ b/doc/global.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: global.n,v 1.4 2002/06/11 13:22:35 msofer Exp $ +'\" RCS: @(#) $Id: global.n,v 1.5 2004/04/28 13:11:33 msofer Exp $ '\" .so man.macros .TH global n "" Tcl "Tcl Built-In Commands" @@ -28,6 +28,10 @@ For the duration of the current procedure any reference to any of the \fIvarname\fRs will refer to the global variable by the same name. .PP +\fIvarname\fR is always treated as the name of a variable, not an +array element. An error is returned if the name looks like an array element, +such as \fBa(b)\fR. + .SH "SEE ALSO" namespace(n), upvar(n), variable(n) diff --git a/doc/upvar.n b/doc/upvar.n index 2b2175e..84399c7 100644 --- a/doc/upvar.n +++ b/doc/upvar.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: upvar.n,v 1.5 2000/11/21 15:56:21 dkf Exp $ +'\" RCS: @(#) $Id: upvar.n,v 1.6 2004/04/28 13:11:33 msofer Exp $ '\" .so man.macros .TH upvar n "" Tcl "Tcl Built-In Commands" @@ -35,8 +35,8 @@ call; it will be created the first time \fImyVar\fR is referenced, just like an ordinary variable. There must not exist a variable by the name \fImyVar\fR at the time \fBupvar\fR is invoked. \fIMyVar\fR is always treated as the name of a variable, not an -array element. Even if the name looks like an array element, -such as \fBa(b)\fR, a regular variable is created. +array element. An error is returned if the name looks like an array element, +such as \fBa(b)\fR. \fIOtherVar\fR may refer to a scalar variable, an array, or an array element. \fBUpvar\fR returns an empty string. |