diff options
author | dkf <dkf@noemail.net> | 2008-10-17 10:22:24 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2008-10-17 10:22:24 (GMT) |
commit | b296d5ba7a53b61b5eda08fda6ae7168e745428c (patch) | |
tree | 5a94240e321022019f593f6bd712833ab12138c6 /doc/set.n | |
parent | fd1af20283d2bed67e18d4990e3c690ee7740702 (diff) | |
download | tcl-b296d5ba7a53b61b5eda08fda6ae7168e745428c.zip tcl-b296d5ba7a53b61b5eda08fda6ae7168e745428c.tar.gz tcl-b296d5ba7a53b61b5eda08fda6ae7168e745428c.tar.bz2 |
Improve clarity of formatting.
FossilOrigin-Name: 71edbde46a8f75eec71181b2238ccd0b3c7c7849
Diffstat (limited to 'doc/set.n')
-rw-r--r-- | doc/set.n | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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.9 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: set.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH set n "" Tcl "Tcl Built-In Commands" @@ -41,17 +41,21 @@ If a procedure is active and \fIvarName\fR is unqualified, then unless \fIvarName\fR was declared to resolve differently through one of the \fBglobal\fR, \fBvariable\fR or \fBupvar\fR commands. .SH EXAMPLES +.PP Store a random number in the variable \fIr\fR: +.PP .CS \fBset\fR r [expr {rand()}] .CE .PP Store a short message in an array element: +.PP .CS \fBset\fR anAry(msg) "Hello, World!" .CE .PP Store a short message in an array element specified by a variable: +.PP .CS \fBset\fR elemName "msg" \fBset\fR anAry($elemName) "Hello, World!" @@ -60,6 +64,7 @@ Store a short message in an array element specified by a variable: Copy a value into the variable \fIout\fR from a variable whose name is stored in the \fIvbl\fR (note that it is often easier to use arrays in practice instead of doing double-dereferencing): +.PP .CS \fBset\fR in0 "small random" \fBset\fR in1 "large random" |