diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-10-17 19:50:58 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-10-17 19:50:58 (GMT) |
commit | 9b7a6c3507ea3383c60aaecb29f873c9b590ccca (patch) | |
tree | 82ce31ebd8f46803d969034f5aa3db8d7974493c /tcl8.6/doc/set.n | |
parent | 87fca7325b97005eb44dcf3e198277640af66115 (diff) | |
download | blt-9b7a6c3507ea3383c60aaecb29f873c9b590ccca.zip blt-9b7a6c3507ea3383c60aaecb29f873c9b590ccca.tar.gz blt-9b7a6c3507ea3383c60aaecb29f873c9b590ccca.tar.bz2 |
rm tcl/tk 8.6.7
Diffstat (limited to 'tcl8.6/doc/set.n')
-rw-r--r-- | tcl8.6/doc/set.n | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/tcl8.6/doc/set.n b/tcl8.6/doc/set.n deleted file mode 100644 index f065087..0000000 --- a/tcl8.6/doc/set.n +++ /dev/null @@ -1,75 +0,0 @@ -'\" -'\" Copyright (c) 1993 The Regents of the University of California. -'\" Copyright (c) 1994-1996 Sun Microsystems, Inc. -'\" -'\" See the file "license.terms" for information on usage and redistribution -'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" -.TH set n "" Tcl "Tcl Built-In Commands" -.so man.macros -.BS -'\" Note: do not modify the .SH NAME line immediately below! -.SH NAME -set \- Read and write variables -.SH SYNOPSIS -\fBset \fIvarName \fR?\fIvalue\fR? -.BE -.SH DESCRIPTION -.PP -Returns the value of variable \fIvarName\fR. -If \fIvalue\fR is specified, then set -the value of \fIvarName\fR to \fIvalue\fR, creating a new variable -if one does not already exist, and return its value. -If \fIvarName\fR contains an open parenthesis and ends with a -close parenthesis, then it refers to an array element: the characters -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. -.PP -If \fIvarName\fR includes namespace qualifiers -(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 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 -.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!" -.CE -.PP -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" -\fBset\fR vbl in[expr {rand() >= 0.5}] -\fBset\fR out [\fBset\fR $vbl] -.CE -.SH "SEE ALSO" -expr(n), global(n), namespace(n), proc(n), trace(n), unset(n), upvar(n), variable(n) -.SH KEYWORDS -read, write, variable |