diff options
author | dgp <dgp@users.sourceforge.net> | 2006-02-01 17:48:04 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-02-01 17:48:04 (GMT) |
commit | 2e9bf45bc4d2510a07a538c48f8103957ede3aaf (patch) | |
tree | ded30cb2443dbed838e4a79ea4cf381328c34592 /doc | |
parent | 0fbd247a14d17e3925000c394aaa26523bd2fa12 (diff) | |
download | tcl-2e9bf45bc4d2510a07a538c48f8103957ede3aaf.zip tcl-2e9bf45bc4d2510a07a538c48f8103957ede3aaf.tar.gz tcl-2e9bf45bc4d2510a07a538c48f8103957ede3aaf.tar.bz2 |
TIP#250 IMPLEMENTATION
* doc/namespace.n: New command [namespace upvar]. [Patch 1275435]
* generic/tclInt.h:
* generic/tclNamesp.c:
* generic/tclVar.c:
* tests/namespace.test:
* tests/upvar.test:
Diffstat (limited to 'doc')
-rw-r--r-- | doc/namespace.n | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/namespace.n b/doc/namespace.n index 60bd8e8..f2327a4 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.18 2005/05/30 00:04:45 dkf Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.19 2006/02/01 17:48:10 dgp Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -249,6 +249,13 @@ This command is the complement of the \fBnamespace qualifiers\fR command. It does not check whether the namespace names are, in fact, the names of currently defined namespaces. .TP +\fBnamespace upvar\fR \fInamespace\fR \fIotherVar myVar \fR?\fIotherVar myVar \fR... +This command arranges for one or more local variables in the current +procedure to refer to variables in \fInamespace\fR. The command +\fBnamespace upvar $ns a b\fR has the same behaviour as +\fBupvar 0 $ns::a b\fR. +\fBnamespace upvar\fR returns an empty string. +.TP \fBnamespace which\fR ?\-\fBcommand\fR? ?\-\fBvariable\fR? \fIname\fR Looks up \fIname\fR as either a command or variable and returns its fully-qualified name. @@ -812,7 +819,7 @@ puts "grill came from [\fBnamespace origin\fR grill]" .CE .SH "SEE ALSO" -interp(n), variable(n) +interp(n), upvar(n), variable(n) .SH KEYWORDS command, ensemble, exported, internal, variable |