diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 12:53:22 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 12:53:22 (GMT) |
commit | 4c2d0f20bfa9108949678cf49bfdc58eedc7bb93 (patch) | |
tree | b3ce80d2f183dc1bd02185c2bf44738b4377c9ed /doc/global.n | |
parent | cd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07 (diff) | |
download | tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.zip tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.tar.gz tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.tar.bz2 |
More minor doc fixes
Diffstat (limited to 'doc/global.n')
-rw-r--r-- | doc/global.n | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/global.n b/doc/global.n index 4555d68..a11e88b 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.8 2004/05/29 18:50:32 jenglish Exp $ +'\" RCS: @(#) $Id: global.n,v 1.9 2004/10/27 12:53:22 dkf Exp $ '\" .so man.macros .TH global n "" Tcl "Tcl Built-In Commands" @@ -23,7 +23,7 @@ This command has no effect unless executed in the context of a proc body. If the \fBglobal\fR command is executed in the context of a proc body, it creates local variables linked to the corresponding global variables (and therefore these variables are listed by info locals). - +.PP If \fIvarname\fR contains namespace qualifiers, the local variable's name is the unqualified name of the global variable, as determined by the \fBnamespace tail\fR command. @@ -31,15 +31,15 @@ the unqualified name of the global variable, as determined by the \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 "EXAMPLE 1" +.SH EXAMPLES This procedure sets the namespace variable \fI::a::x\fR .CS proc reset {} { - global a::x + \fBglobal\fR a::x set x 0 } .CE -.SH "EXAMPLE 2" +.PP This procedure accumulates the strings passed to it in a global buffer, separated by newlines. It is useful for situations when you want to build a message piece-by-piece (as if with \fBputs\fR) but @@ -47,7 +47,7 @@ send that full message in a single piece (e.g. over a connection opened with \fBsocket\fR or as part of a counted HTTP response). .CS proc accum {string} { - global accumulator + \fBglobal\fR accumulator append accumulator $string \\n } .CE |