ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



set(n)                                      Tcl Built-In Commands                                     set(n)



____________________________________________________________________________________________________________

NAME
       set - Read and write variables

SYNOPSIS
       set varName ?value?
____________________________________________________________________________________________________________


DESCRIPTION
       Returns  the  value  of  variable  varName.   If value is specified, then set the value of varName to
       value, creating a new variable if one doesn't already exist, and return its value.  If  varName  con-tains contains
       tains 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 varName refers to a scalar variable.

       If  varName includes namespace qualifiers (in the array name if it refers to an array element), or if
       varName is unqualified (does not include the names of any containing namespaces) but no procedure  is
       active,  varName  refers to a namespace variable resolved according to the rules described under NAME
       RESOLUTION in the namespace manual page.

       If a procedure is active and varName is unqualified, then varName refers  to  a  parameter  or  local
       variable  of  the  procedure,  unless  varName was declared to resolve differently through one of the
       global, variable or upvar commands.


SEE ALSO
       expr(n), global(n), namespace(n), proc(n), trace(n), unset(n), upvar(n), variable(n)


KEYWORDS
       read, write, variable



Tcl                                                                                                   set(n)

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.